Module: MerbAuth::Adapter::DataMapper
- Defined in:
- lib/merb-auth/adapters/datamapper/map.rb,
lib/merb-auth/adapters/datamapper/model.rb
Defined Under Namespace
Modules: DefaultModelSetup, InstanceMethods, Map
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/merb-auth/adapters/datamapper/model.rb', line 5 def self.included(base) # Ensure base is a resource base.send(:include, ::DataMapper::Resource) unless ::DataMapper::Resource > base # Setup the properties for the model set_model_class_decs!(base) base.send(:include, Map) base.send(:include, InstanceMethods ) base.send(:include, Common) MA[:single_resource] ||= base.name.snake_case.gsub("::", "__").to_sym MA[:plural_resource] ||= MA[:single_resource].to_s.pluralize.to_sym MA[:user] = base end |