Hi, Brendan!
Thank you very much for releasing mobile_fu. I've started to play around with it and it looks very promising. At the moment I have the following problem:
I have a controller with a show_icon action that looks as follows:
def show_icon
icon = WidgetIcon.find(params[:id])
respond_to do |format|
format.jpg { send_data(icon.image_data,
:type => 'image/jpeg',
:filename => icon.create_temp_file,
:disposition => 'inline') }
format.gif { send_data(icon.image_data,
:type => 'image/gif',
:filename => icon.create_temp_file,
:disposition => 'inline') }
format.png { send_data(icon.image_data,
:type => 'image/png',
:filename => icon.create_temp_file,
:disposition => 'inline') }
end
end
When I call it from a mobile with a URL that ends in 1.png, for example, the request parameter 'format' is set correctly to 'png', but it gets overridden by mobile_fu with 'mobile'. It'd be great, if I could disable this for certain actions in a controller. Perhaps with a filter like this:
before_filter :disable_mobile_detection, :only => :show_icon
Best,
Maik