(Inspired by #34)
Right now:
class Hat
include Arkenstone::Document
url 'http://example.com/hats'
has_many :feathers
end
class Feather
end
Will fetch a hat's feathers by calling http://example.com/hats/:id/feathers. Add an option to the association declarations (has_many, belongs_to, etc) to override the associated model name:
class Hat
include Arkenstone::Document
url 'http://example.com/hats'
has_many :feathers, entity_name: 'turtles'
end
Which'll use build this url instead: http://example.com/hats/:id/turtles.
(Inspired by #34)
Right now:
Will fetch a hat's feathers by calling
http://example.com/hats/:id/feathers. Add an option to the association declarations (has_many,belongs_to, etc) to override the associated model name:Which'll use build this url instead:
http://example.com/hats/:id/turtles.