Make sure you’re filling @wages in the controller. Also, look into
“collection_select”, similar to the following, to replace your code in
the view
<%= collection_select :pay, :wage_id, @wages, :id, :wage %>
HTH,
Nathan
Make sure you’re filling @wages in the controller. Also, look into
“collection_select”, similar to the following, to replace your code in
the view
<%= collection_select :pay, :wage_id, @wages, :id, :wage %>
HTH,
Nathan
It looks like Gaurav’s code has a join on the tables.
i.e.
Probably not necessary, if I grab the id chosen and stick it into an
instance variable.Then do and if / else.
Stuart
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs