Skip to content

Commit

Permalink
Revert "Rails 5.0 -- Fix comments_controller_spec.rb and moderations_…
Browse files Browse the repository at this point in the history
…controll…" (#335)

This reverts commit 94073bb.
  • Loading branch information
yuenmichelle1 authored Jul 1, 2024
1 parent 94073bb commit 0bec7ea
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion app/controllers/comments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ def destroy
def filter_subject_default
board_ids = Board.where(section: params[:section], subject_default: params[:subject_default]).pluck :id
params[:board_id] = board_ids.join ','
params.permit!
end
end
1 change: 0 additions & 1 deletion app/controllers/moderations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ def invert_enums
inverted_state = Moderation.states[params[:state]]
raise Talk::InvalidParameterError.new(:state, "in #{ Moderation.states.keys }", params[:state]) unless inverted_state
params[:state] = inverted_state
params.permit!
end
end
2 changes: 1 addition & 1 deletion app/serializers/concerns/talk_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def resource(params = { }, scope = nil, context = { })
end

def page(params = { }, scope = nil, context = { })
super params.to_h, scope_preloading_for(scope), context.merge(params: params)
super params, scope_preloading_for(scope), context.merge(params: params)
end

def page_with_options(options)
Expand Down

0 comments on commit 0bec7ea

Please sign in to comment.