Upgrade to github gems and add jsonapi suppliers endpoint for user app
This commit is contained in:
@@ -16,7 +16,8 @@ gem 'slim-rails'
|
|||||||
#gem 'active_model_serializers', github: 'rails-api/active_model_serializers' # explicitly outside assets
|
#gem 'active_model_serializers', github: 'rails-api/active_model_serializers' # explicitly outside assets
|
||||||
#gem 'active_model_serializers', '0.9.3' # explicitly outside assets
|
#gem 'active_model_serializers', '0.9.3' # explicitly outside assets
|
||||||
#gem 'jsonapi-serializers', github: 'bterkuile/jsonapi-serializers'
|
#gem 'jsonapi-serializers', github: 'bterkuile/jsonapi-serializers'
|
||||||
gem 'jsonapi-serializers', path: '/home/benjamin/development/rails/components/jsonapi-serializers'
|
#gem 'jsonapi-serializers', path: '/home/benjamin/development/rails/components/jsonapi-serializers'
|
||||||
|
gem 'jsonapi-serializers', github: 'bterkuile/jsonapi-serializers'
|
||||||
group :assets do
|
group :assets do
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
gem 'jquery-ui-rails'
|
gem 'jquery-ui-rails'
|
||||||
@@ -37,7 +38,8 @@ group :assets do
|
|||||||
gem 'uglifier', '>= 1.0.3'
|
gem 'uglifier', '>= 1.0.3'
|
||||||
|
|
||||||
#gem 'ember-rails'
|
#gem 'ember-rails'
|
||||||
gem 'ember-rails', path: '/home/benjamin/development/rails/components/ember-rails'
|
#gem 'ember-rails', path: '/home/benjamin/development/rails/components/ember-rails'
|
||||||
|
gem 'ember-rails', github: 'bterkuile/ember-rails'
|
||||||
|
|
||||||
#gem 'ember-source', '~> 1.13.9'
|
#gem 'ember-source', '~> 1.13.9'
|
||||||
#gem 'emblem-rails'
|
#gem 'emblem-rails'
|
||||||
@@ -80,7 +82,7 @@ gem 'mini_magick'
|
|||||||
gem 'active_attr'
|
gem 'active_attr'
|
||||||
gem 'naught'
|
gem 'naught'
|
||||||
gem 'cancancan'
|
gem 'cancancan'
|
||||||
gem 'sucker_punch'
|
gem 'sucker_punch' # Really needed?
|
||||||
|
|
||||||
#gem 'geokit'
|
#gem 'geokit'
|
||||||
gem 'iso_country_codes'
|
gem 'iso_country_codes'
|
||||||
|
|||||||
+15
-13
@@ -30,16 +30,8 @@ GIT
|
|||||||
sprockets (>= 3.3, < 3.4)
|
sprockets (>= 3.3, < 3.4)
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/bterkuile/simply_stored.git
|
remote: git://github.com/bterkuile/ember-rails.git
|
||||||
revision: 323c11efe7f86b3e156acfa7e53d8f06d8fb73c4
|
revision: fd2008b3aed644892e5529267410a5875460405a
|
||||||
specs:
|
|
||||||
simply_stored (1.0.0)
|
|
||||||
activesupport
|
|
||||||
couch_potato (>= 0.2.15)
|
|
||||||
rest-client (>= 1.4.2)
|
|
||||||
|
|
||||||
PATH
|
|
||||||
remote: /home/benjamin/development/rails/components/ember-rails
|
|
||||||
specs:
|
specs:
|
||||||
ember-rails (0.19.2)
|
ember-rails (0.19.2)
|
||||||
active-model-adapter-source (>= 1.13.0)
|
active-model-adapter-source (>= 1.13.0)
|
||||||
@@ -49,12 +41,22 @@ PATH
|
|||||||
jquery-rails (>= 1.0.17)
|
jquery-rails (>= 1.0.17)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
|
|
||||||
PATH
|
GIT
|
||||||
remote: /home/benjamin/development/rails/components/jsonapi-serializers
|
remote: git://github.com/bterkuile/jsonapi-serializers.git
|
||||||
|
revision: 55516761bec40a4f492003dffd3e18d575075b07
|
||||||
specs:
|
specs:
|
||||||
jsonapi-serializers (0.2.6)
|
jsonapi-serializers (0.2.6)
|
||||||
activesupport
|
activesupport
|
||||||
|
|
||||||
|
GIT
|
||||||
|
remote: git://github.com/bterkuile/simply_stored.git
|
||||||
|
revision: 323c11efe7f86b3e156acfa7e53d8f06d8fb73c4
|
||||||
|
specs:
|
||||||
|
simply_stored (1.0.0)
|
||||||
|
activesupport
|
||||||
|
couch_potato (>= 0.2.15)
|
||||||
|
rest-client (>= 1.4.2)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
remote: https://rails-assets.org/
|
remote: https://rails-assets.org/
|
||||||
@@ -193,7 +195,7 @@ GEM
|
|||||||
eventmachine (>= 1.0.0.beta.4)
|
eventmachine (>= 1.0.0.beta.4)
|
||||||
email_validator (1.6.0)
|
email_validator (1.6.0)
|
||||||
activemodel
|
activemodel
|
||||||
ember-data-source (2.0.0)
|
ember-data-source (2.0.1)
|
||||||
ember-source (>= 1.8, < 3.0)
|
ember-source (>= 1.8, < 3.0)
|
||||||
ember-handlebars-template (0.4.1)
|
ember-handlebars-template (0.4.1)
|
||||||
barber (>= 0.9.0)
|
barber (>= 0.9.0)
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
module Users
|
||||||
|
class SuppliersController < Users::ApplicationController
|
||||||
|
|
||||||
|
def show
|
||||||
|
@supplier = Supplier.find(params[:id])
|
||||||
|
render json: {}, status: :not_found and return unless @supplier.present?
|
||||||
|
render json: @supplier, include: %w[
|
||||||
|
product_categories
|
||||||
|
product_categories.products
|
||||||
|
product_categories.products.product_variants
|
||||||
|
]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -80,6 +80,7 @@ Qwaiter::Application.routes.draw do
|
|||||||
get '/close_window' => 'dashboard#close_window'
|
get '/close_window' => 'dashboard#close_window'
|
||||||
namespace :users, path: '/user/api/v1' do
|
namespace :users, path: '/user/api/v1' do
|
||||||
resources :product_categories, only: [:index]
|
resources :product_categories, only: [:index]
|
||||||
|
resources :suppliers, only: [:show]
|
||||||
resources :lists, only: [:index, :show] do
|
resources :lists, only: [:index, :show] do
|
||||||
collection do
|
collection do
|
||||||
get :current
|
get :current
|
||||||
|
|||||||
Reference in New Issue
Block a user