Class: SedgeCms::PagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/sedge_cms/pages_controller.rb,
app/controllers/alchemy_cms/pages_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#collections, #dashboard, #raise_not_found!, #templates

Instance Method Details

#editObject



12
13
14
15
# File 'app/controllers/sedge_cms/pages_controller.rb', line 12

def edit
  @editing = true
  render html: render_mustache.html_safe
end

#edit_pathObject



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

def edit_path
  return "/cms/pages/#{params[:path]}"
end

#editingObject



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

def editing
  return @editing
end

#showObject



7
8
9
10
# File 'app/controllers/sedge_cms/pages_controller.rb', line 7

def show
  # render html: Rails.cache.fetch(params[:path]) { render_mustache.html_safe }
  render html: render_mustache.html_safe
end

#show_pathObject



29
30
31
# File 'app/controllers/sedge_cms/pages_controller.rb', line 29

def show_path
  return "/#{params[:path].to_s.gsub('edit', '')}"
end

#titleObject



17
18
19
# File 'app/controllers/sedge_cms/pages_controller.rb', line 17

def title
  return @title
end