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

Version Path
kiteditor-1.0.25 app/controllers/mercury_controller.rb
kiteditor-1.0.24 app/controllers/mercury_controller.rb
kiteditor-1.0.23 app/controllers/mercury_controller.rb
kiteditor-1.0.22 app/controllers/mercury_controller.rb
kiteditor-1.0.21 app/controllers/mercury_controller.rb
kiteditor-1.0.20 app/controllers/mercury_controller.rb
kiteditor-1.0.19 app/controllers/mercury_controller.rb
kiteditor-1.0.18 app/controllers/mercury_controller.rb
kiteditor-1.0.17 app/controllers/mercury_controller.rb
kiteditor-1.0.16 app/controllers/mercury_controller.rb
kiteditor-1.0.14 app/controllers/mercury_controller.rb
kiteditor-1.0.13 app/controllers/mercury_controller.rb
kiteditor-1.0.12 app/controllers/mercury_controller.rb
kiteditor-1.0.11 app/controllers/mercury_controller.rb
kiteditor-1.0.10 app/controllers/mercury_controller.rb
kiteditor-1.0.9 app/controllers/mercury_controller.rb
kiteditor-1.0.8 app/controllers/mercury_controller.rb
kiteditor-1.0.7 app/controllers/mercury_controller.rb
kiteditor-1.0.6 app/controllers/mercury_controller.rb
kiteditor-1.0.5 app/controllers/mercury_controller.rb