Remove bottom padding if no footer in mobile

Add a method in routes
Copy mobile routes under the scope 'app' for app usage
This commit is contained in:
chris committed 2013-01-11 19:14:48 +08:00
1 parent 91d1487a04
commit 4e2cbac027
3 files changed
+28 -19

No files matched your search

+8
View File
@@ -2,6 +2,8 @@ class MobileController < ApplicationController
layout 'mobile'
before_filter :no_footer_for_app
def index
date_now = Time.now
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page(params[:page_main]).per(15)
@@ -49,4 +51,10 @@ class MobileController < ApplicationController
@page_title = @page_context.page.title
end
protected
def no_footer_for_app
@no_footer = true if request.path.starts_with?("/app")
end
end