开发者

Formastic and attribute_methods_generated? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the 开发者_开发知识库worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

I am having an Issue with Formastic and Ruby On Rails Here is the run down Ruby and Rails info

  • Ruby on Rails 3.0.7
  • Ruby 1.9.2p180
  • Formtastic 1.2.3 Here is the error

    undefined method `attribute_methods_generated?' for nil:NilClass

Controller

def new
   @assignment = Assignments.new
   @title = "Sign Up"
end

View

<% semantic_form_for(@assignment) do |f| %>
    <%= render 'shared/error_messages', :object => f.object %>
    <%= f.inputs :name, :duedate, :class, :priority, :grade, :descrption, :points_value %>
   <%= f.submit "New Assignment" %>
<% end %>


you have typos and reserved keywords in your example. you may want to check this again.

":class" is a reserved keyword, I suppose and "descrption" (typo)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜