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”
58 59 |
# File 'lib/tasks/controllers/notee_controller.rb', line 58 def about end |
#archive_posts ⇒ Object
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 |
#archives ⇒ Object
GET “/archives”
33 34 35 |
# File 'lib/tasks/controllers/notee_controller.rb', line 33 def archives @archives = notee_archives end |
#categories ⇒ Object
GET “/categories”
21 22 23 |
# File 'lib/tasks/controllers/notee_controller.rb', line 21 def categories @categories = get_parent_categories_arr end |
#category_posts ⇒ Object
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 |
#index ⇒ Object
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 |
#show ⇒ Object
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 = (@post) end |
#writer_posts ⇒ Object
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 |
#writers ⇒ Object
GET “/writers”
46 47 48 |
# File 'lib/tasks/controllers/notee_controller.rb', line 46 def writers @writers = notee_writers end |