JSONApi progress

This commit is contained in:
2015-09-03 20:42:48 +02:00
parent f47a8a9ed0
commit e4dde28dd0
27 changed files with 215 additions and 64 deletions
+1
View File
@@ -4,6 +4,7 @@ module Qwaiter
extend ActiveSupport::Autoload
autoload :Distribution
autoload :Serializer
autoload :UserBaseSerializer
autoload :Counter
autoload :Broadcaster
autoload :Couchbase
+30
View File
@@ -0,0 +1,30 @@
class Qwaiter::UserBaseSerializer
include JSONAPI::Serializer
def base_url
"/user"
end
def format_name(attribute_name)
#attribute_name.to_s.dasherize
attribute_name.to_s
end
def unformat_name(attribute_name)
#attribute_name.to_s.underscore
attribute_name.to_s
end
def relationship_related_link(attribute_name)
super
end
def relationship_self_link(attribute_name)
end
def self.attributes(*attrs)
attrs.each do |attr|
attribute attr
end
end
end