Displaying 1 result from an estimated 1 matches for "loadarchitectures".
2010 Jul 19
2
newbie, reciving a hash from the view
...like
check or not checked, and recover this hash modified to the controller
for work with it
so i wrote this
in the view
<%@arquitectures.each do |key, value| %>
<%=key.to_s%> <%=check_box(key, value, {}, true, false) %>
<%end%></p>
in the controller
before_filter loadArchitectures #here load @architectures
def create
if request.post?
begin
@architectures.each do |key, value|
if value
newArchitecture=Architecture.new()
newArchitecture.nombre=clave
newArchitecture.project_id=@project.id
newAr...