Class: NoteeController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- NoteeController
- Defined in:
- lib/tasks/controllers/notee_controller.rb
Instance Method Summary collapse
-
#about ⇒ Object
GET “/about”.
-
#archive_posts ⇒ Object
GET “/archives/:year” GET “/archives/:year/:month”.
-
#archives ⇒ Object
GET “/archives”.
-
#categories ⇒ Object
GET “/categories”.
-
#category_posts ⇒ Object
GET “/categories/:name_or_slug”.
-
#index ⇒ Object
GET “/”.
-
#show ⇒ Object
GET “/:id_or_slug”.
-
#writer_posts ⇒ Object
GET “/writers/:name_or_id”.
-
#writers ⇒ Object
GET “/writers”.
Instance Method Details
#about ⇒ Object
GET “/about”
57 58 |
# File 'lib/tasks/controllers/notee_controller.rb', line 57 def about end |
#archive_posts ⇒ Object
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 |
#archives ⇒ Object
GET “/archives”
32 33 34 |
# File 'lib/tasks/controllers/notee_controller.rb', line 32 def archives @archives = notee_archives end |
#categories ⇒ Object
GET “/categories”
20 21 22 |
# File 'lib/tasks/controllers/notee_controller.rb', line 20 def categories @categories = notee_categories end |
#category_posts ⇒ Object
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 |
#index ⇒ Object
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 |
#show ⇒ Object
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 = (@post) end |
#writer_posts ⇒ Object
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 |
#writers ⇒ Object
GET “/writers”
45 46 47 |
# File 'lib/tasks/controllers/notee_controller.rb', line 45 def writers @writers = notee_writers end |