Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

good idea to name the method config #17

Closed
dei79 opened this Issue Aug 26, 2012 · 1 comment

Comments

Projects
None yet
2 participants

dei79 commented Aug 26, 2012

When I tried to use your sample class and named my method config I got the following error

undefined method `allow_forgery_protection' for #<SimpleConfig::Config:0x007f9d9598dd18>

After digging into I found out that ActiveRecord is doing something when your controller has a method called config. I found this description:

https://rails.lighthouseapp.com/projects/8994/tickets/5534-controller-breaks-when-an-action-is-named-config

Would it be a good option to implement the allow_forgery_protection method to make your sample working?

I can do this after discussion if you want to

Collaborator

weppos commented Aug 26, 2012

You are probably trying to add the config method in a class where config is already defined (and chances are it points to Rails.application.config).

Make sure you are not overriding Rails methods.

@weppos weppos was assigned Aug 26, 2012

@weppos weppos closed this May 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment