Sha256: 99d4d8ae22ba21244668583b0bcb5d2ad6c27feba09ef20de6da621a50b85caf
Contents?: true
Size: 685 Bytes
Versions: 32
Compression:
Stored size: 685 Bytes
Contents
class MercuryController < ActionController::Base include ::Mercury::Authentication protect_from_forgery before_filter :authenticate, :only => :edit layout false def edit render :text => '', :layout => 'mercury' end def resource render :action => "/#{params[:type]}/#{params[:resource]}" end def snippet_options @options = params[:options] || {} render :action => "/snippets/#{params[:name]}/options" end def snippet_preview render :action => "/snippets/#{params[:name]}/preview" end def test_page render :text => params end private def authenticate redirect_to "/#{params[:requested_uri]}" unless can_edit? end end
Version data entries
32 entries across 32 versions & 3 rubygems