Posts Tagged as ‘url_for’

November 14, 2007

Nice(r) Hash treatment for URLs

Isn’t it nice how Rails lets you add form elements using the convention: store[manager] = Bob Smith store[location][state] = Wisconsin store[location][zip] = 53590 And easily process them on the server side with something like: Store.new(params[:store]) So, why does this: link_to “Store”, :controller => :store, :action => :show, :store => { :manager => “Bob Smith”, :location [...]