Reputation: 33
I generated model and views using scaffold generate command, but after generation this problem appear...
Showing /home/coderx/development/avioapp/app/views/plains/_form.html.erb
where line #1
raised:
undefined method `define_attribute_methods' for nil:NilClass
Extracted source (around line #1):
1: <%= form_for @plain do |f| %>
2: <% if @plain.errors.any? %>
3: <div id="error_explanation">
4: <h2><%= pluralize(@plain.errors.count, "error") %> prohibited this plain from being saved:</h2>
Upvotes: 0
Views: 680
Reputation: 6786
I also faced this type of error. In my case it was due to some reserve keywords (as table field).
Though you have found your solution but I think it might help others :)
Upvotes: 0
Reputation: 33
Yeap, it was a problem in Controller, I have messed up something when was using git branches.. Thank you for your suggestion!
Upvotes: 1