The amount of frustration that this has caused me has prompted me to
seek outside help. I know answer is right in front of me, but after
pouring over API documents and dozens of forum posts the answer still
eludes me:
I have a javascript func that detects the dimensions of the client
browser, I know I need to use an ajax.request to get the information
back to the controller - but for the life of me I cannot figure out how
to do that.
In my View:
new Ajax.Request(’/main/gallery’, {asynchronous:true, method:‘get’,
parameters:‘size=normal’});
In my Controller:
@gallery_size = params[:size] unless params[:size].nil?
I would be eternally grateful for any response.