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

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