Class: CmsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/cms_controller.rb

Instance Method Summary collapse

Instance Method Details

#blogObject



26
27
28
29
30
31
# File 'app/controllers/cms_controller.rb', line 26

def blog
  @posts = Post.all
  respond_to do |format|
    format.html # index.html.erb
  end
end

#categoryObject



14
15
16
17
18
19
# File 'app/controllers/cms_controller.rb', line 14

def category
  @category = Category.find(params[:id])
  respond_to do |format|
    format.html # index.html.erb
  end
end

#pageObject



8
9
10
11
12
13
# File 'app/controllers/cms_controller.rb', line 8

def page
  @page = Page.find(params[:id])
  respond_to do |format|
    format.html # index.html.erb
  end
end

#postObject



2
3
4
5
6
7
# File 'app/controllers/cms_controller.rb', line 2

def post
  @post = Post.find(params[:id])
  respond_to do |format|
    format.html # index.html.erb
  end
end

#tagObject



20
21
22
23
24
25
# File 'app/controllers/cms_controller.rb', line 20

def tag
  @tag = Tag.find(params[:id])
  respond_to do |format|
    format.html # index.html.erb
  end
end