Edit the form


Im using the 5 views and one controller.To edit the form and

produced Couldn’t find ResortBasic without an ID

View code


<% form_tag :action => ‘editresortbasic’,:controller=>‘Wizard’ do %>

Edit Resort Basic

Resort Name
        <%= text_field_tag :resortname %>
       <b>Resort Type</b>
       <!--%=f.collection_select(resort_basic.resorttypeid, ResortType.find(:all),id,resorttype)%-->
       <%=select("resorttype", "resorttypeid", ResortType.find(:all).collect {|p| [ p.resorttype, [p.id](http://p.id/) ] })%>

       <b>Resort Class</b>
       <!--%=collection_select(:resortclassid, ResortClass.find(:all),:id,:resortclass)%-->
       <%=select("resortclass", "resortclassid", ResortClass.find(:all).collect {|p| [ p.resortclass, [p.id](http://p.id/) ] })%>
Season <%=select("seasontype", "seasontypeid", Season.find(:all).collect {|p| [ p.seasontype, [p.id](http://p.id/) ] })%>
Website <%= text_field_tag :website %>

        <%= submit_tag "Next",:class =>'myButton' %>

<% end %>

controller code…

def editresortbasic

@resort_basic = ResortBasic.find(params[:id])
if request.post?

# flash[:notice] = ‘City was successfully updated.’

   # render :action=>'editresortcontact'


but i got the bugs

this is a mailing list, don't post the same question several times

You must use form_for instead of form_tag or add the id parameter

<% form_for @editresortbasic do %>

But reading your other posts I would recommend working through some
Rails tutorials, so you understand at least a bit what you are doing