Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup configs through configatron #31

Closed
dinershtein opened this issue Nov 15, 2010 · 1 comment
Closed

Setup configs through configatron #31

dinershtein opened this issue Nov 15, 2010 · 1 comment

Comments

@dinershtein
Copy link

Hi Michael!

Thanks a lot for your crm! It is great!

I want to participate in the development and suggest using configatron gem for handling configuration variables (https://github.com/markbates/configatron).

The main reason is ability to override them in plugins.

When I override ffcrm constants, I get warnings "already initialized constant" at the moment.

For example I want to add ability to comment on models.

In CommentsController you set:
COMMENTABLE = %w(account_id campaign_id contact_id lead_id opportunity_id task_id).freeze

And then I want to override it in my plugin:
CommentsController::COMMENTABLE = CommentsController::COMMENTABLE + ['ClassB', 'ClassA']

Which brings up the error I mentioned above.

Another advantage is that it is faster to get settings from configatron, rather than getting them from DB.

I want to prepare a pull request for you with updated settings functionality. What do you think about this?

@michaeldv
Copy link
Member

Hey Leonid,

Sent you a private email earlier today.

Michael

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants