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

Rails 7.0 fix deprecation #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source :rubygems
source 'https://rubygems.org'

gem 'rake'
gem 'i18n', '>= 0.5.0'
Expand Down
6 changes: 3 additions & 3 deletions lib/russian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ def init_i18n

# See I18n::translate
def translate(key, options = {})
I18n.translate(key, options.merge({ :locale => LOCALE }))
end
I18n.translate(key, **options.merge({ :locale => LOCALE }))
end
alias :t :translate

# See I18n::localize
def localize(object, options = {})
I18n.localize(object, options.merge({ :locale => LOCALE }))
I18n.localize(object, **options.merge({ :locale => LOCALE }))
end
alias :l :localize

Expand Down
70 changes: 0 additions & 70 deletions lib/russian/active_model_ext/custom_error_message.rb

This file was deleted.

6 changes: 1 addition & 5 deletions lib/russian/russian_rails.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Rails hacks
if defined?(ActiveModel)
require 'active_model_ext/custom_error_message'
end

if defined?(ActionView::Helpers)
require 'action_view_ext/helpers/date_helper'
require 'action_view_ext/helpers/date_helper'
end