Sha256: eb808d90cccfb3e23c6d6be290582312d92811f7b6f18e72330cd48606e5a9a3
Contents?: true
Size: 1.44 KB
Versions: 15
Compression:
Stored size: 1.44 KB
Contents
require 'authorization' class V<%= api_version %>::<%= HorsePower.get_camel(resource_name) %>Serializer < ActiveModel::Serializer embed :ids, include: true attributes :id <% attributes.each do |pair| -%> attributes :<%= HorsePower.get_column(pair) %> <% end -%> attributes :created_at attributes :updated_at #has_one :bulletin #has_many :posts def include_id? return ::Authorization::V<%= api_version %>::<%= HorsePower.get_camel(resource_name) %>.include_id?(current_user,object,@options) end <% attributes.each do |pair| -%> def include_<%= HorsePower.get_column(pair) %>? return ::Authorization::V<%= api_version %>::<%= HorsePower.get_camel(resource_name) %>.include_<%= HorsePower.get_column(pair) %>?(current_user,object,@options) end <% end -%> def include_created_at? return ::Authorization::V<%= api_version %>::<%= HorsePower.get_camel(resource_name) %>.include_created_at?(current_user,object,@options) end def include_updated_at? return ::Authorization::V<%= api_version %>::<%= HorsePower.get_camel(resource_name) %>.include_updated_at?(current_user,object,@options) end def include_associations! #include! :bulletin if ::Authorization::V<%= api_version %>::<%= HorsePower.get_camel(resource_name) %>.include_bulletin?(current_user,object,@options) #include! :posts if ::Authorization::V<%= api_version %>::<%= HorsePower.get_camel(resource_name) %>.include_posts?(current_user,object,@options) end end
Version data entries
15 entries across 15 versions & 1 rubygems