Sha256: bfcd6c6a1d9a092eb99e54c26b42ab4baf1086f11ec447a9d356719bd924f762

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

##
## Need authentication for locale admin routes use this:
##
# => MagicLocales::BaseController.class_eval do 
# =>   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

2 entries across 2 versions & 1 rubygems

Version Path
magic_locales-0.0.4 lib/generators/magic_locales/templates/magic_initializer.rb
magic_locales-0.0.3 lib/generators/magic_locales/templates/magic_initializer.rb