Skip to content

Commit

Permalink
Fix rails 5.2.2 incompability
Browse files Browse the repository at this point in the history
Overwrite update function in Configuration
  • Loading branch information
coolo committed Dec 6, 2018
1 parent 11c2bae commit 1ca0ea1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/api/app/models/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ def method_missing(method_name, *args, &block)
end
end

# overwrite update function as the one in active record expects an id
def update(opts)
Configuration.first.update(opts)
end

# Check if ldap group support is enabled?
def ldapgroup_enabled?
CONFIG['ldap_mode'] == :on && CONFIG['ldap_group_support'] == :on
Expand Down

0 comments on commit 1ca0ea1

Please sign in to comment.