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

Version Path
magic_locales-0.0.21 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.20 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.19 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.18 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.17 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.17.beta2 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.17.beta1 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.16 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.15 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.14 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.13 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.12 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.11 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.10 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.9 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.8 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.7 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.6 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.5 lib/generators/magic_locales/templates/magic_initializer.rb