Class: MercuryController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Mercury::Authentication
Defined in:
app/controllers/mercury_controller.rb

Direct Known Subclasses

Mercury::ImagesController

Instance Method Summary collapse

Methods included from Mercury::Authentication

#can_edit?

Instance Method Details

#editObject



8
9
10
# File 'app/controllers/mercury_controller.rb', line 8

def edit
  render :text => '', :layout => 'mercury'
end

#resourceObject



12
13
14
# File 'app/controllers/mercury_controller.rb', line 12

def resource
  render :action => "/#{params[:type]}/#{params[:resource]}"
end

#snippet_optionsObject



16
17
18
19
# File 'app/controllers/mercury_controller.rb', line 16

def snippet_options
  @options = params[:options] || {}
  render :action => "/snippets/#{params[:name]}/options"
end

#snippet_previewObject



21
22
23
# File 'app/controllers/mercury_controller.rb', line 21

def snippet_preview
  render :action => "/snippets/#{params[:name]}/preview"
end

#test_pageObject



25
26
27
# File 'app/controllers/mercury_controller.rb', line 25

def test_page
  render :text => params
end