Gwyrdain / apprentices-workshop

Creative Commons Zero v1.0 Universal
5 stars 2 forks source link

Error today #141

Open Cordir opened 8 years ago

Cordir commented 8 years ago

I had just finished deleting several rooms from a zone, and was about to go delete several mobs. I clicked on the 'Mobiles' link button to to go the Mobiles summary page, and got this error:

NoMethodError in Mobiles#index Showing /app/app/views/mobiles/index.html.erb where line #46 raised:

undefined method `formal_vnum' for "UNKNOWN":String Extracted source (around line #46): 43 44 45 46 47 48 49

                 <% else %>
                   <% target_reset = @area.resets.where(:reset_type => 'M', :val_2 => mobile.id).first %>
                   <% target_room = room_info(target_reset.val_4,'self') %>
                   <%= link_to "At #{target_room.formal_vnum}", area_reset_path(@area, target_reset) %>
                   <% if mobile.count_resets > 1 %>
                     </br>and <%= mobile.count_resets - 1 %> more...
                   <% end %>

Rails.root: /app

Application Trace | Framework Trace | Full Trace app/views/mobiles/index.html.erb:46:in block (2 levels) in _app_views_mobiles_index_html_erb___2287951386658214858_69936295889400' app/views/mobiles/index.html.erb:30:inblock in _app_views_mobiles_index_html_erb_2287951386658214858_69936295889400' app/views/mobiles/index.html.erb:2:in `_app_views_mobiles_index_htmlerb2287951386658214858_69936295889400' Request

Parameters:

{"area_id"=>"64"} Toggle session dump Toggle env dump Response

Headers:

None

Gwyrdain commented 8 years ago

Recreated this.

Code needs to check that the room still exists before saying that the mobile has a reset at that room.