Rename Feeds::ChangesetCommentsController to ChangesetComments::FeedsController
We usually create nested controllers with the main controller as the module, and the nested controller as the specialization, e.g. Users::DeletionsController or Traces::IconsController. This then leaves the topic of whether the feed resource is plural, and whether we are then showing a singular feed or showing a list (index) of objects. The routes are carefully named so that we have `changesets_comments_feed_path` (the comments feed for all changesets) vs `changeset_comment_feed_path(changeset)` (the comments for a singular changeset).
This commit is contained in:
parent
a948f2bc24
commit
10a4c5cf6e
10 changed files with 32 additions and 30 deletions
|
@ -1,16 +1,16 @@
|
|||
module Feeds
|
||||
class ChangesetCommentsController < ApplicationController
|
||||
module ChangesetComments
|
||||
class FeedsController < ApplicationController
|
||||
before_action :authorize_web
|
||||
before_action :set_locale
|
||||
|
||||
authorize_resource
|
||||
authorize_resource :changeset_comment
|
||||
|
||||
before_action -> { check_database_readable(:need_api => true) }
|
||||
around_action :web_timeout
|
||||
|
||||
##
|
||||
# Get a feed of recent changeset comments
|
||||
def index
|
||||
def show
|
||||
if params[:changeset_id]
|
||||
# Extract the arguments
|
||||
changeset_id = params[:changeset_id].to_i
|
Loading…
Add table
Add a link
Reference in a new issue