lib/blinksale/rest_client.rb
def has_many(resource_name, options = {}, &block)
      root.has_many resource_name, options, block
      meta_def resource_name do |*filter|
        root.send(resource_name, *filter)
      end
    end
# Creates a new collection resource on the root resource
# and creates an access method on the singleton class
Creates a new collection resource on the root resource
and creates an access method on the singleton class
Creates a new collection resource on the root resource and creates an access method on the singleton class
def has_many(resource_name, options = {}, &block)
      root.has_many resource_name, options, block
      meta_def resource_name do |*filter|
        root.send(resource_name, *filter)
      end
    end
def has_many ( resource_name , options = { } , & block ) root . has_many resource_name , options , block meta_def resource_name do | * filter | root . send ( resource_name , * filter ) end end
Creates a new collection resource on the root resource
and creates an access method on the singleton class
Creates a new collection resource on the root resource and creates an access method on the singleton class
resource_name
options
block