lib/alchemy/controller_actions.rb in alchemy_cms-3.5.0 vs lib/alchemy/controller_actions.rb in alchemy_cms-3.6.0

- old
+ new

@@ -63,11 +63,11 @@ @language = lang.is_a?(Language) ? lang : load_alchemy_language_from_id_or_code(lang) else # find the best language and remember it for later @language = load_alchemy_language_from_params || load_alchemy_language_from_session || - load_default_alchemy_language + Language.default end store_current_alchemy_language(@language) end def load_alchemy_language_from_params @@ -85,14 +85,9 @@ end 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 - - # Load the default language from current site. - def load_default_alchemy_language - Language.default || raise(DefaultLanguageNotFoundError) end # Stores language's id in the session. # # Also stores language in +Language.current+