API v1 group_order_articles endpoints

This commit is contained in:
wvengen 2018-10-13 16:27:24 +02:00 committed by wvengen
parent ed9192c47f
commit e1d50e5b9c
11 changed files with 646 additions and 10 deletions

View file

@ -21,6 +21,14 @@ class GroupOrder < ApplicationRecord
scope :ordered, -> { includes(:ordergroup).order('groups.name') }
def self.ransackable_attributes(auth_object = nil)
%w(id price)
end
def self.ransackable_associations(auth_object = nil)
%w(order group_order_articles)
end
# Generate some data for the javascript methods in ordering view
def load_data
data = {}