issues with text_field in rails

11 views
Skip to first unread message

amvis

unread,
May 8, 2012, 3:10:11 PM5/8/12
to rubyonra...@googlegroups.com
view
<%= form_for(@mstype) do |f| %>
<p> <%= f.text_field(:Name,:class => "span1",:placeholder => "x") %>
<%end%>


Got the error like this

NoMethodError in Pgmdfntions#pgmdfntion

Showing pgm.html.erb where line #57 raised:

undefined method `Name' for #<Pgmdfntion:0xb457ad28>
But i could do this as same before. but in this case got the error...?

Javier Quarite

unread,
May 8, 2012, 3:12:59 PM5/8/12
to rubyonra...@googlegroups.com
What fields are in your Pgmdfntions model/table ?
Rails is searching for "Name" field

JavierQ

Tim Shaffer

unread,
May 8, 2012, 3:13:49 PM5/8/12
to rubyonra...@googlegroups.com
It's case sensitive. Are you sure you don't mean "name" instead of "Name"?
Reply all
Reply to author
Forward
0 new messages