if request.post? @resort_basic.update_attributes(params[:resort_basic])
end
But i click the edit button and i got the text box empty.Im new in ruby
and
here im only person doing this application and i can’t understand the
error.So i frequently asked the question to you.Thanks for ur help.give
any
idea?
this assumes, that the id of the ResortBasic to be edited is
handed to this action
end
then you can built your view like this:
<% form_for @resort_basic do |f| %>
<%= f.text_field :name %>
<% end %>
That way the form “knows” of the @resort_basic object
and using the textfield that way, Rails knows that it’s linked
to this object and reads the value from @resort_basic.name
Same for all the other fields in your form that are columns
in the resort_basics table.
you can read many details about that in all RoR online tutorials,
and you should (must) get comfortable with that kind of Rails syntax.
There is not much sense in starting a project without knowing
at least the basic syntax of the framework.