This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersController < ResourceFull::Base | |
identified_by :username, :unless => lambda { |id| id =~ /^[0-9]+$/ } | |
queryable_with :city, :state, :from => :address | |
queryable_with :name, :columns => [:first_name, :last_name] | |
queryable_with :email_address, :fuzzy => true | |
queryable_with :is_active, :scope => :active | |
orderable_by :city, :from => :address | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'libxml' | |
module LibXML | |
module XML | |
module Conversions | |
module Document | |
def to_hash | |
root.to_hash | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveRecord | |
class KindRollback < Rollback | |
end | |
end | |
module UpdateAttributesWithKind | |
def self.included(model_class) | |
model_class.alias_method_chain :update_attributes, :kind | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Blackbox | |
class Registry | |
module Query | |
def registry | |
@registry ||= Blackbox::Registry.new | |
end | |
def configure | |
yield registry |
NewerOlder