Hi,
Basically I've created a system with categories, that belong to
tutorials, and these tutorials have positions.
I've only recently created to new position thing, and I've added this
to my edit form:
<p>
<%= f.label :position %><br />
<%= f.text_field :position %>
</p>
This works fine in production mode, and everything is as it should be.
However when I upload it to my actual site (so it goes to production
mode) it says an error has occured. And the production log gives out
this error:
ActionView::TemplateError (undefined method `position' for #<Tutorial:
0xb752a384>) on line #21 of app/views/tutorials/edit.html.erb:
18: </p>
19: <p>
20: <%= f.label :position %><br />
21: <%= f.text_field :position %>
22: </p>
23: <p>
24: <%= f.submit 'Update' %>
app/views/tutorials/edit.html.erb:21
app/views/tutorials/edit.html.erb:4
Since it mentions line four, I figured I should show you guys line
four as well:
<% form_for(@tutorial) do |f| %>
I don't know why it wont work. Everything else that's like this works,
for example the category_id:
<p>
<%= f.label :category_id %><br />
<%= f.text_field :category_id %>
</p>
I just can't figure out why it won't work,
Please Help,
Thanks In Advance,
Joe
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-ta...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.