Permalink
Browse files

Changing the options hash... the Hash.select does not behave the same…

… way in 1.8 and 1.9
  • Loading branch information...
1 parent 2be50ff commit 413e91c3403ab442e32d1d4bf060665f0c216d1a @tscolari tscolari committed Oct 8, 2011
Showing with 5 additions and 3 deletions.
  1. +1 −1 Gemfile.lock
  2. +4 −2 lib/mobylette/controllers/respond_to_mobile_requests.rb
View
@@ -179,7 +179,7 @@ GEM
sprockets (2.0.0)
hike (~> 1.2)
rack (~> 1.0)
- tilt (!= 1.3.0, ~> 1.1)
+ tilt (~> 1.1, != 1.3.0)
syntax (1.0.0)
term-ansicolor (1.0.6)
thor (0.14.6)
@@ -51,9 +51,11 @@ def respond_to_mobile_requests(options = {})
:ignore_mobile_view_path => false
})
- valid_options = [:fall_back, :skip_xhr_requests, :ignore_mobile_view_path]
cattr_accessor :mobylette_options
- self.mobylette_options = options.select {|option| valid_options.include?(option)}
+ # works on 1.9, but not on 1.8
+ #valid_options = [:fall_back, :skip_xhr_requests, :ignore_mobile_view_path]
+ #self.mobylette_options = options.reject {|option| !valid_options.include?(option)}
+ self.mobylette_options = options
self.send(:include, Mobylette::Controllers::RespondToMobileRequestsMethods)
end

0 comments on commit 413e91c

Please sign in to comment.