You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using MobileFu, in a controller that inherits from VannaController instead of ApplicationController, mobile views don't show up when you navigate to the appropriate page with a mobile device, even though index.mobile.haml exists. What you get instead is a dump of the raw output of the index method of the controller for that page. The regular version (in index.html.haml) shows up just fine.
The instructions for MobileFu say to put the line "has_mobile_fu" in your application controller. If you put that line in the vanna controller instead, you get the error described above. If you copy and paste the contents of has_mobile_fu into the vanna controller, but delete the line "before_filter :set_request_format if set_request_format" then the mobile view works, but it shows the regular view. The set_request_format sets request.format to :mobile instead of :html, so that action is what seems to break the view.
The text was updated successfully, but these errors were encountered:
I'm not very familiar with MobileFu so I'm just guessing here, but if you want to switch on a :mobile format type, you can probably do that by adding a post-process block for mobile. There are a couple files that add post-process blocks for default redirects, etc, and you can probably write a Vanna plugin that enables MobileFu that way.
You can also use client-side rendering for VannaController pages. Any URL that serves HTML from a Vanna controller can serve the JSON needed to build it, Vanna is designed around it being very easy to transition to a Javascript MVC strategy for a given page.
When using MobileFu, in a controller that inherits from VannaController instead of ApplicationController, mobile views don't show up when you navigate to the appropriate page with a mobile device, even though index.mobile.haml exists. What you get instead is a dump of the raw output of the index method of the controller for that page. The regular version (in index.html.haml) shows up just fine.
The instructions for MobileFu say to put the line "has_mobile_fu" in your application controller. If you put that line in the vanna controller instead, you get the error described above. If you copy and paste the contents of has_mobile_fu into the vanna controller, but delete the line "before_filter :set_request_format if set_request_format" then the mobile view works, but it shows the regular view. The set_request_format sets request.format to :mobile instead of :html, so that action is what seems to break the view.
The text was updated successfully, but these errors were encountered: