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”



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

def about
end

#archive_postsObject

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



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

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”



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

def archives
  @archives = notee_archives
end

#categoriesObject

GET “/categories”



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

def categories
  @categories = get_parent_categories_arr
end

#category_postsObject

GET “/categories/:name_or_slug”



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

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

#indexObject

GET “/”



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

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

#showObject

GET “/:id_or_slug”



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

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”



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

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

#writersObject

GET “/writers”



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

def writers
  @writers = notee_writers
end