RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: tbarho
Site: tybarho.com
The best way i've found to do this is to just add a route in your routes file like:
match '/editor(/*requested_uri)' => 'mercury_auth#edit', :as => :mercury_editor
Then create a new controller that inherits from MercuryController, like:
class MercuryAuthController < MercuryController include SessionsHelper before_filter :authenticate_with_admin, :only => [:edit] def edit render :text => '', :layout => 'mercury' end end
Then, you can get all the functionality of Mercury, but limit access on requests like that. That might be a bit closer to what you were looking for.
Oh, and be sure to add that route before the mercury routes in your routes.rb file
The best way i've found to do this is to just add a route in your routes file like:
Then create a new controller that inherits from MercuryController, like:
Then, you can get all the functionality of Mercury, but limit access on requests like that. That might be a bit closer to what you were looking for.
Oh, and be sure to add that route before the mercury routes in your routes.rb file