Sha256: 65e805c048dec8a4b677d368a2b8aa808e6cd54be535dec6ee22137d61d2da40
Contents?: true
Size: 521 Bytes
Versions: 19
Compression:
Stored size: 521 Bytes
Contents
## ## Need authentication for locale admin routes use this: ## # => MagicLocales::BaseController.class_eval do # => # layout proc { |controller| controller.request.xhr? ? false : "application" } # => private # => # overwrite authentication method # => def authenticate_visitor # => unless current_user && current_user.is_admin? # => session["user_return_to"] = request.fullpath # => redirect_to new_user_session_path, alert: "Only for admins, dude!" # => end # => end # => end
Version data entries
19 entries across 19 versions & 1 rubygems