Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

replaced @@mobylette_options by self.mobylette_options.#36

Open
leogavidia wants to merge 1 commit intotscolari:masterfrom
leogavidia:master
Open

replaced @@mobylette_options by self.mobylette_options.#36
leogavidia wants to merge 1 commit intotscolari:masterfrom
leogavidia:master

Conversation

@leogavidia
Copy link

It fixes NoMethodError undefined method `[]' for nil:NilClass

I've always had this problem in JRuby. I used to solve it adding in my controller:

self.mobylette_options ||= {}

after

include Mobylette::RespondToMobileRequests

and adding again a configuration

mobylette_config do |config|
config[:mobile_user_agents] = proc { %r{iphone|android}i }
config[:fallback_chains] = { mobile: [:mobile, :html] }
config[:skip_user_agents] = []
end

It fixes NoMethodError undefined method `[]' for nil:NilClass

(atleast in JRuby)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant