Skip to content

Instantly share code, notes, and snippets.

@stevenabrooks
Created April 24, 2014 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenabrooks/11267236 to your computer and use it in GitHub Desktop.
Save stevenabrooks/11267236 to your computer and use it in GitHub Desktop.
ActionView::TemplateError:
ActionView::TemplateError (undefined method `item' for #<Sale:70341641267180 @id=1063696>) on line #68 of app/views/emails/folders/items_notification.text.html.erb:
65: <% case key.to_s
66: when "Sale", "Rental" -%>
67: <%=
68: changes = @entries[key].collect {|entry| entry.item.interesting_changes(@membership.last_notified_at)}.flatten(1).group_by {|change| [change[0], change[1]]}
69: changes.collect {|key, values| "#{FormattingHelper.number values.size} #{key[1].downcase}" }.join("<br />")
70: %>
71: <% when "Building" -%>
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/activerecord/lib/active_record/attribute_methods.rb:275:in `method_missing'
app/views/emails/folders/items_notification.text.html.erb:68:in `block (2 levels) in _run_erb_app47views47emails47folders47items_notification46text46html46erb'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/activerecord/lib/active_record/named_scope.rb:114:in `collect'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/activerecord/lib/active_record/named_scope.rb:114:in `collect'
app/views/emails/folders/items_notification.text.html.erb:68:in `block in _run_erb_app47views47emails47folders47items_notification46text46html46erb'
app/views/emails/folders/items_notification.text.html.erb:56:in `each'
app/views/emails/folders/items_notification.text.html.erb:56
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/renderable.rb:34:in `block in render'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/base.rb:306:in `with_template'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/renderable.rb:30:in `render'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/template.rb:205:in `render_template'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/base.rb:265:in `render'
plugins/tagged_rendering/tagged_rendering.rb:11:in `render'
haml (3.1.8) lib/haml/helpers/action_view_mods.rb:13:in `render_with_haml'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:600:in `render'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:586:in `render_message'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:511:in `block in create!'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:501:in `each'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:501:in `create!'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:485:in `initialize'
plugins/snippets/lib/action_mailer/batch.rb:22:in `new'
plugins/snippets/lib/action_mailer/batch.rb:22:in `batch'
(irb):170:in `irb_binding'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_input'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:156:in `block in eval_input'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69:in `catch'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69:in `start'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/bin/irb:12:in `<main>'
from On line #68 of app/views/emails/folders/items_notification.text.html.erb
65: <% case key.to_s
66: when "Sale", "Rental" -%>
67: <%=
68: changes = @entries[key].collect {|entry| entry.item.interesting_changes(@membership.last_notified_at)}.flatten(1).group_by {|change| [change[0], change[1]]}
69: changes.collect {|key, values| "#{FormattingHelper.number values.size} #{key[1].downcase}" }.join("<br />")
70: %>
71: <% when "Building" -%>
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/activerecord/lib/active_record/attribute_methods.rb:275:in `method_missing'
app/views/emails/folders/items_notification.text.html.erb:68:in `block (2 levels) in _run_erb_app47views47emails47folders47items_notification46text46html46erb'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/activerecord/lib/active_record/named_scope.rb:114:in `collect'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/activerecord/lib/active_record/named_scope.rb:114:in `collect'
app/views/emails/folders/items_notification.text.html.erb:68:in `block in _run_erb_app47views47emails47folders47items_notification46text46html46erb'
app/views/emails/folders/items_notification.text.html.erb:56:in `each'
app/views/emails/folders/items_notification.text.html.erb:56
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/renderable.rb:34:in `block in render'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/base.rb:306:in `with_template'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/renderable.rb:30:in `render'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/template.rb:205:in `render_template'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionpack/lib/action_view/base.rb:265:in `render'
plugins/tagged_rendering/tagged_rendering.rb:11:in `render'
haml (3.1.8) lib/haml/helpers/action_view_mods.rb:13:in `render_with_haml'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:600:in `render'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:586:in `render_message'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:511:in `block in create!'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:501:in `each'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:501:in `create!'
/Users/stevenbrooks/.rvm/gems/ruby-1.9.3-p392@se-app/bundler/gems/rails-c51c00bb89b9/actionmailer/lib/action_mailer/base.rb:485:in `initialize'
plugins/snippets/lib/action_mailer/batch.rb:22:in `new'
plugins/snippets/lib/action_mailer/batch.rb:22:in `batch'
(irb):170:in `irb_binding'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_input'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:156:in `block in eval_input'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69:in `catch'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb.rb:69:in `start'
/Users/stevenbrooks/.rvm/rubies/ruby-1.9.3-p392/bin/irb:12:in `<main>'
Maybe IRB bug!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment