Skip to content

Commit

Permalink
Add implicit api controller actions
Browse files Browse the repository at this point in the history
For some reason this is required after upgrading versioncake to 3.0

I suspect this is because rails won't create the action by detecting the
views with the version suffix.
  • Loading branch information
jhawthorn committed Feb 26, 2016
1 parent 9ac481c commit c8c1a85
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/app/controllers/spree/api/config_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
module Spree
module Api
class ConfigController < Spree::Api::BaseController
def show
end

def money
end
end
end
end
3 changes: 3 additions & 0 deletions api/app/controllers/spree/api/line_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class LineItemsController < Spree::Api::BaseController
before_filter :load_order, only: [:create, :update, :destroy]
around_filter :lock_order, only: [:create, :update, :destroy]

def new
end

def create
variant = Spree::Variant.find(params[:line_item][:variant_id])
@line_item = @order.contents.add(
Expand Down
3 changes: 3 additions & 0 deletions api/app/controllers/spree/api/products_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def index
respond_with(@products)
end

def new
end

def show
@product = find_product(params[:id])
expires_in 15.minutes, public: true
Expand Down
3 changes: 3 additions & 0 deletions api/app/controllers/spree/api/taxonomies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ def index
respond_with(taxonomies)
end

def new
end

def show
respond_with(taxonomy)
end
Expand Down
3 changes: 3 additions & 0 deletions api/app/controllers/spree/api/taxons_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def index
respond_with(@taxons)
end

def new
end

def show
@taxon = taxon
respond_with(@taxon)
Expand Down

0 comments on commit c8c1a85

Please sign in to comment.