#1 new
Maik Schmidt

Missing method to suppress :mobile format

Reported by Maik Schmidt | July 22nd, 2008 @ 11:50 PM

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') }



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



No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Want to automatically detect mobile devices that access your Rails application? Mobile Fu allows you to do just that. People can access your site from a Palm, Blackberry, iPhone, Nokia, etc. and it will automatically adjust the format of the request from :html to :mobile.

People watching this ticket