Displaying 2 results from an estimated 2 matches for "show_emrec".
2006 Mar 05
2
Need help understanding Rails magic!
...n.name)
if selected == ''y''
@allergy = Allergy.new
@allergy.emrec_id = @emrec.id
@allergy.description = column.human_name
@allergy.save
end
end
redirect_to :controller => ''creation'', :action => ''show_emrec''
end
private
def find_allergies
session[:allergy_item] ||= AllergyItem.new
end
def find_emrec
session[:emrec] ||= Emrec.new
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails...
2006 Mar 09
3
Need help PLEASE!!! - updating collection from form
...w do I pull the
# data from the params hash of hashes? The current code is:
i.update(params[:illness].id, (params[:illness].id).illness_date, (params[:illness].id).qualifier)
i.save
end
redirect_to :controller => ''creation'', :action => ''show_emrec''
end
---------------------- end controller code -------------------------
------------------ view code --------------------------------
<%= form_tag(:action => "update_illness") %>
<table cellpadding="5" cellspacing="0">
<%
odd_o...