lib/alchemy/controller_actions.rb in alchemy_cms-7.1.12 vs lib/alchemy/controller_actions.rb in alchemy_cms-7.2.1
- old
+ new
@@ -54,11 +54,11 @@
# Sets the current site in a cvar so the Language model
# can be scoped against it.
#
def set_current_alchemy_site
- Site.current = current_alchemy_site
+ Current.site = current_alchemy_site
end
# Sets the current language for Alchemy.
#
def set_alchemy_language(lang = nil)
@@ -81,14 +81,14 @@
def load_alchemy_language_from_id_or_code(id_or_code)
Language.find_by(id: id_or_code) ||
Language.find_by_code(id_or_code)
end
- # Stores language in +Language.current+
+ # Stores language in +Current.language+
#
def store_current_alchemy_language(language)
if language&.id
- Language.current = language
+ Current.language = language
end
end
end
end