Skip to content

Commit

Permalink
Remove responders gem
Browse files Browse the repository at this point in the history
We don't need a gem for responding with JSON from a Rails
controller.
  • Loading branch information
tvdeyen committed May 28, 2024
1 parent 98293af commit 71ffa5d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion alchemy_cms.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency "kaminari", ["~> 1.1"]
gem.add_runtime_dependency "originator", ["~> 3.1"]
gem.add_runtime_dependency "ransack", [">= 1.8", "< 5.0"]
gem.add_runtime_dependency "responders", [">= 2.0", "< 4.0"]
gem.add_runtime_dependency "sassc-rails", ["~> 2.1"]
gem.add_runtime_dependency "simple_form", [">= 4.0", "< 6"]
gem.add_runtime_dependency "sprockets", [">= 3.0", "< 5"]
Expand Down
1 change: 0 additions & 1 deletion app/controllers/alchemy/api/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
module Alchemy
class Api::BaseController < Alchemy::BaseController
layout false
respond_to :json

rescue_from CanCan::AccessDenied, with: :render_not_authorized
rescue_from ActiveRecord::RecordNotFound, with: :render_not_found
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/alchemy/api/elements_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def index
def show
@element = Element.where(id: params[:id]).includes(*element_includes).first
authorize! :show, @element
respond_with @element
render json: @element, serializer: ElementSerializer
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/alchemy/api/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def nested
#
def show
authorize! :show, @page
respond_with @page
render json: @page, serializer: PageSerializer
end

def move
Expand Down
1 change: 0 additions & 1 deletion lib/alchemy_cms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
require "kaminari"
require "non_stupid_digest_assets"
require "ransack"
require "responders"
require "sassc-rails"
require "simple_form"
require "turbo-rails"
Expand Down

0 comments on commit 71ffa5d

Please sign in to comment.