Class: NoteeController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/tasks/controllers/notee_controller.rb

Instance Method Summary collapse

Instance Method Details

#aboutObject

GET “/about”



57
58
# File 'lib/tasks/controllers/notee_controller.rb', line 57

def about
end

#archive_postsObject

GET “/archives/:year” GET “/archives/:year/:month”



38
39
40
41
42
# File 'lib/tasks/controllers/notee_controller.rb', line 38

def archive_posts
  @posts = archive_notees(params[:year], params[:month].present? ? params[:month] : nil)
  @notee_title = 'Archive: ' + params[:year] + (params[:month].present? ? "/" + params[:month].to_s : "")
  render :action => 'posts'
end

#archivesObject

GET “/archives”



32
33
34
# File 'lib/tasks/controllers/notee_controller.rb', line 32

def archives
  @archives = notee_archives
end

#categoriesObject

GET “/categories”



20
21
22
# File 'lib/tasks/controllers/notee_controller.rb', line 20

def categories
  @categories = notee_categories
end

#category_postsObject

GET “/categories/:name_or_slug”



25
26
27
28
29
# File 'lib/tasks/controllers/notee_controller.rb', line 25

def category_posts
  @posts = category_notees(params[:name_or_slug])
  @notee_title = 'Category: ' + params[:name_or_slug]
  render :action => 'posts'
end

#indexObject

GET “/”



6
7
8
9
10
# File 'lib/tasks/controllers/notee_controller.rb', line 6

def index
  @posts = notees
  @notee_title = 'Post Lists'
  render :action => 'posts'
end

#showObject

GET “/:id_or_slug”



13
14
15
16
17
# File 'lib/tasks/controllers/notee_controller.rb', line 13

def show
  redirect_to root_path if params[:id_or_slug].nil?
  @post = notee(params[:id_or_slug])
  @notee_meta = notee_set_meta_by_post(@post)
end

#writer_postsObject

GET “/writers/:name_or_id”



50
51
52
53
54
# File 'lib/tasks/controllers/notee_controller.rb', line 50

def writer_posts
  @posts = writer_notees(params[:name_or_id])
  @notee_title = 'Writer: ' + params[:name_or_id]
  render :action => 'posts'
end

#writersObject

GET “/writers”



45
46
47
# File 'lib/tasks/controllers/notee_controller.rb', line 45

def writers
  @writers = notee_writers
end