Skip to content

Commit

Permalink
actually use instance_exec on model, no need for args
Browse files Browse the repository at this point in the history
  • Loading branch information
doits committed Jul 26, 2019
1 parent 947f752 commit a18b8f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mobility/plugins/fallbacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ def define_read(fallbacks)
fallback_locales =
if fallback == true
if fallbacks.is_a?(Proc)
instance_exec(model, &fallbacks)
model.instance_exec(&fallbacks)
else
fallbacks[locale]
end
elsif fallback.is_a?(Proc)
instance_exec(model, &fallback)
model.instance_exec(&fallback)
else
fallback
end
Expand Down

0 comments on commit a18b8f9

Please sign in to comment.