Skip to content

Commit

Permalink
Adapt for Redmine 4
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislav-yashin committed Dec 13, 2018
1 parent a530b21 commit 93c49a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/migrate/0001_add_en_name_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddEnNameToUser < ActiveRecord::Migration
class AddEnNameToUser < Rails.version < '5.0' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]

def self.up
add_column(:users, "name_in_english", :string)
Expand Down
3 changes: 2 additions & 1 deletion lib/localizable/user_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def self.included(base)
unloadable # Send unloadable so it will not be unloaded in development.
safe_attributes 'name_in_english'

alias_method_chain :name, :localizable
alias_method :name_without_localizable, :name
alias_method :name, :name_with_localizable
end
end
end
Expand Down

0 comments on commit 93c49a9

Please sign in to comment.