Module: BlogUrlHelpers
- Extended by:
- ActiveSupport::Concern
- Included in:
- Admin::PostCommentsController, Admin::PostsController, PostsController
- Defined in:
- app/controllers/concerns/blog_url_helpers.rb
Instance Method Summary collapse
- #admin_post_comments_path(blog_key: nil) ⇒ Object
- #admin_post_path(post) ⇒ Object
- #admin_post_post_comments_path(post) ⇒ Object
-
#admin_posts_path(blog_key: nil) ⇒ Object
Admin.
- #edit_admin_post_path(post) ⇒ Object
- #new_admin_post_path(blog_key: nil) ⇒ Object
- #post_archive_path(archive_date, opts = {}) ⇒ Object
- #post_category_archive_path(category_url_name, archive_date, opts = {}) ⇒ Object
- #post_category_path(category_url_name, opts = {}) ⇒ Object
- #post_path(url_name, opts = {}) ⇒ Object
- #posts_path(opts = {}) ⇒ Object
Instance Method Details
#admin_post_comments_path(blog_key: nil) ⇒ Object
51 52 53 54 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 51 def admin_post_comments_path(blog_key: nil) blog_key ||= params[:blog_key] url_for :controller => '/admin/post_comments', :action => 'index', :blog_key => blog_key end |
#admin_post_path(post) ⇒ Object
43 44 45 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 43 def admin_post_path(post) url_for :controller => '/admin/posts', :action => 'show', :id => post.id, :blog_key => post.blog_key end |
#admin_post_post_comments_path(post) ⇒ Object
56 57 58 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 56 def admin_post_post_comments_path(post) url_for :controller => '/admin/post_comments', :action => 'index', :post_id => post.id, :blog_key => post.blog_key end |
#admin_posts_path(blog_key: nil) ⇒ Object
Admin
33 34 35 36 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 33 def admin_posts_path(blog_key: nil) blog_key ||= params[:blog_key] url_for :controller => '/admin/posts', :action => 'index', :blog_key => blog_key end |
#edit_admin_post_path(post) ⇒ Object
47 48 49 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 47 def edit_admin_post_path(post) url_for :controller => '/admin/posts', :action => 'edit', :id => post.id, :blog_key => post.blog_key end |
#new_admin_post_path(blog_key: nil) ⇒ Object
38 39 40 41 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 38 def new_admin_post_path(blog_key: nil) blog_key ||= params[:blog_key] url_for :controller => '/admin/posts', :action => 'new', :blog_key => blog_key end |
#post_archive_path(archive_date, opts = {}) ⇒ Object
21 22 23 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 21 def post_archive_path(archive_date, opts={}) url_for opts.merge({:controller => '/posts', :action => 'archive', :archive_date => archive_date, :blog_key => params[:blog_key]}) end |
#post_category_archive_path(category_url_name, archive_date, opts = {}) ⇒ Object
25 26 27 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 25 def post_category_archive_path(category_url_name, archive_date, opts={}) url_for opts.merge({:controller => '/posts', :action => 'category', :category_url_name => category_url_name, :archive_date => archive_date, :blog_key => params[:blog_key]}) end |
#post_category_path(category_url_name, opts = {}) ⇒ Object
17 18 19 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 17 def post_category_path(category_url_name, opts={}) url_for opts.merge({:controller => '/posts', :action => 'category', :category_url_name => category_url_name, :blog_key => params[:blog_key]}) end |
#post_path(url_name, opts = {}) ⇒ Object
13 14 15 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 13 def post_path(url_name, opts={}) url_for opts.merge({:controller => '/posts', :action => 'show', :id => url_name, :blog_key => params[:blog_key]}) end |
#posts_path(opts = {}) ⇒ Object
9 10 11 |
# File 'app/controllers/concerns/blog_url_helpers.rb', line 9 def posts_path(opts={}) url_for opts.merge({:controller => '/posts', :action => 'index', :blog_key => params[:blog_key]}) end |