Skip to content
Browse files

Removing mobile view path from readme and lib

  • Loading branch information...
1 parent 2fe99cf commit 840868447d1c9991a860f3b1de23d01e8b930d8b @tscolari tscolari committed Oct 10, 2011
Showing with 0 additions and 15 deletions.
  1. +0 −6 README.rdoc
  2. +0 −9 lib/mobylette/controllers/respond_to_mobile_requests.rb
View
6 README.rdoc
@@ -47,12 +47,6 @@ There is a difference between is_mobile_view? and is_mobile_request?. You may ha
Same as mobylette_stylesheet_link_tag, but for javascript files and javascript_include_tag
-== Mobile View Path
-
-Mobylette will look your mobile templates first at app/mobile_views. This default behavior may be disabled by passing the :ignore_mobile_view_path => true option. Or it can be ignored, it will look there first, but at app/view after that. This is just an extra organization option you may use if you prefer.
-
- respond_to_mobile_requests :ignore_mobile_view_path => true
-
== Fall Backs
By default, when the mobile format is not found, mobylette will fall back to the request original format. For example, if a cell phone makes a request by html, and there is no mobile view, it will render the html. You may force it always to fall back to a especific format, by passing the :fall_back parameter to the respond_to_mobile_requests method:
View
9 lib/mobylette/controllers/respond_to_mobile_requests.rb
@@ -38,11 +38,6 @@ module ClassMethods
# mobile verification. This will let your ajax calls to work as intended.
# You may disable this (actually you will have to) if you are using JQuery Mobile, or
# other js framework that uses ajax. To disable, set :skip_xhr_requests => false
- # * :ignore_mobile_view_path => true/false
- # False by default. This will force rails to look for the mobile views in the
- # app/mobile_views path before app/views. This behavior is only for mobile requests.
- # You may ignore this path aswell, it is just an extra organization option you have.
- #
def respond_to_mobile_requests(options = {})
return if self.included_modules.include?(Mobylette::Controllers::RespondToMobileRequestsMethods)
@@ -122,10 +117,6 @@ def handle_mobile
return if session[:mobylette_override] == :ignore_mobile
if respond_as_mobile?
- unless self.mobylette_ignore_mobile_view_path
- prepend_view_path File.join(Rails.root, 'app', 'mobile_views')
- end
-
original_format = request.format.to_sym
request.format = :mobile
if self.mobylette_fall_back_format != false

0 comments on commit 8408684

Please sign in to comment.
Something went wrong with that request. Please try again.