-
Notifications
You must be signed in to change notification settings - Fork 197
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
fixes #173 #277
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
Merit::AppPointRules ||= Merit::PointRules.new.defined_rules | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use SCREAMING_SNAKE_CASE for constants. |
||
include Merit::ControllerExtensions | ||
rescue NameError => e | ||
# Trap NameError if installing/generating files | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
attr_accessible :sash if show_attr_accessible? | ||
|
||
send :"_merit_#{Merit.orm}_specific_config" | ||
|
There was a problem hiding this comment.
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.