Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Missing method to suppress :mobile format

#1

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

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

State: new
Milestone: none
Assigned to: Brendan G. Lim Brendan G. Lim

Activity

No comments yet.

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.