app/controllers/fiona7/release_controller.rb in infopark_fiona7-1.2.0.0.0 vs app/controllers/fiona7/release_controller.rb in infopark_fiona7-1.2.0.0.1
- old
+ new
@@ -1,7 +1,9 @@
module Fiona7
class ReleaseController < ActionController::Base
+ helper_method :current_locale
+
def release
obj_ids = params[:objs]
objs = WriteObj.find(obj_ids)
comment = params[:comment]
errors = []
@@ -39,9 +41,13 @@
render "preview", layout: false
end
end
protected
+ def current_locale
+ Scrivito::Configuration.ui_locale || I18n.locale
+ end
+
def in_rtc_workspace(&block)
Scrivito::Workspace.find('rtc').as_current(&block)
end
def carefully_release(errors, obj, comment=nil)