Skip to content

Commit ae3e4bc

Browse files
committed
removed overridden method and undefined instance variable warnings
1 parent aa1aad9 commit ae3e4bc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

β€Žlib/pagy/extras/i18n.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Frontend
1010

1111
Pagy::I18n.clear.instance_eval { undef :load; undef :t } # unload the pagy default constant for efficiency
1212

13-
# no :pagy_without_i18n alias with the i18n gem
13+
alias :pagy_without_i18n :pagy_t
1414
def pagy_t_with_i18n(*args) ::I18n.t(*args) end
1515
alias :pagy_t :pagy_t_with_i18n
1616

β€Žlib/pagy/frontend.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def pagy_link_proc(pagy, link_extra='')
6767
end
6868

6969
# Similar to I18n.t: just ~18x faster using ~10x less memory
70-
def pagy_t(path, vars={}) Pagy::I18n.t(@pagy_locale, path, vars) end
70+
def pagy_t(path, vars={}) Pagy::I18n.t(@pagy_locale||=nil, path, vars) end
7171

7272
end
7373
end

0 commit comments

Comments
 (0)