Skip to content

Commit

Permalink
Remove RABL remnants
Browse files Browse the repository at this point in the history
RABL was removed from the project on version 2.4.0 (See solidusio#2147 solidusio#2146).
This updates the responder template to match with Jbuilder and updates
the README file.
  • Loading branch information
JuanCrg90 committed Nov 10, 2019
1 parent dd42c4a commit 45972bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# solidus_api

API contains the controllers and rabl views implementing the REST API of
API contains the controllers and Jbuilder views implementing the REST API of
Solidus.

## Testing
Expand Down
4 changes: 2 additions & 2 deletions api/lib/spree/api/responders.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# frozen_string_literal: true

require 'responders'
require 'spree/api/responders/rabl_template'
require 'spree/api/responders/jbuilder_template'

module Spree
module Api
module Responders
class AppResponder < ActionController::Responder
include RablTemplate
include JbuilderTemplate
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Spree
module Api
module Responders
module RablTemplate
module JbuilderTemplate
def to_format
if template
render template, status: options[:status] || 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper'

describe "Rabl Cache", type: :request, caching: true do
describe "Jbuilder Cache", type: :request, caching: true do
let!(:user) { create(:admin_user) }

before do
Expand All @@ -11,7 +11,7 @@
expect(Spree::Product.count).to eq(1)
end

it "doesn't create a cache key collision for models with different rabl templates" do
it "doesn't create a cache key collision for models with different jbuilder templates" do
get "/api/variants", params: { token: user.spree_api_key }
expect(response.status).to eq(200)

Expand Down

0 comments on commit 45972bc

Please sign in to comment.