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

fixes #173 #277

Closed
wants to merge 3 commits into from
Closed

fixes #173 #277

wants to merge 3 commits into from

Conversation

jnettome
Copy link

No description provided.

jnettome added 2 commits July 24, 2017 17:02
applying the suggested solution on merit-gem#173
fixing already initialized constant
Merit::AppBadgeRules = Merit::BadgeRules.new.defined_rules
Merit::AppPointRules = Merit::PointRules.new.defined_rules
Merit::AppBadgeRules ||= Merit::BadgeRules.new.defined_rules
Merit::AppPointRules ||= Merit::PointRules.new.defined_rules

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use SCREAMING_SNAKE_CASE for constants.

@@ -85,8 +85,8 @@ class Engine < Rails::Engine
ActiveSupport.on_load(:action_controller) do
begin
# Load app rules on boot up
Merit::AppBadgeRules = Merit::BadgeRules.new.defined_rules
Merit::AppPointRules = Merit::PointRules.new.defined_rules
Merit::AppBadgeRules ||= Merit::BadgeRules.new.defined_rules

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use SCREAMING_SNAKE_CASE for constants.

@@ -7,7 +7,7 @@ def has_merit(options = {})
# That's why MeritableModel belongs_to Sash. Can't use
# dependent: destroy as it may raise FK constraint exceptions. See:
# https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1079-belongs_to-dependent-destroy-should-destroy-self-before-assocation
belongs_to :sash, class_name: 'Merit::Sash', inverse_of: nil
belongs_to :sash, class_name: 'Merit::Sash', inverse_of: nil, optional: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Line is too long. [82/80]

@tachyons
Copy link
Contributor

tachyons commented Nov 4, 2017

Handled in #282, Please check

@tute
Copy link
Member

tute commented Nov 4, 2017

CI is red, and issue was fixed in master. Closing this PR. Thank you both!

@tute tute closed this Nov 4, 2017
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

Successfully merging this pull request may close these issues.

4 participants