2009-03-19 19:28:59 -04:00
|
|
|
#--
|
2011-12-31 15:27:47 -05:00
|
|
|
# Copyright (c) 2004-2012 David Heinemeier Hansson
|
2009-03-19 19:28:59 -04:00
|
|
|
#
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
# a copy of this software and associated documentation files (the
|
|
|
|
# "Software"), to deal in the Software without restriction, including
|
|
|
|
# without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
# permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
# the following conditions:
|
|
|
|
#
|
|
|
|
# The above copyright notice and this permission notice shall be
|
|
|
|
# included in all copies or substantial portions of the Software.
|
|
|
|
#
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
|
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
|
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
#++
|
|
|
|
|
2009-12-16 12:56:51 -05:00
|
|
|
activesupport_path = File.expand_path('../../../activesupport/lib', __FILE__)
|
|
|
|
$:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
|
2009-05-29 17:06:21 -04:00
|
|
|
require 'active_support'
|
2010-10-10 19:11:04 -04:00
|
|
|
require 'active_model/version'
|
2009-12-16 12:56:51 -05:00
|
|
|
|
2009-03-19 19:28:59 -04:00
|
|
|
module ActiveModel
|
2009-12-02 23:01:01 -05:00
|
|
|
extend ActiveSupport::Autoload
|
|
|
|
|
|
|
|
autoload :AttributeMethods
|
2010-01-04 17:29:07 -05:00
|
|
|
autoload :BlockValidator, 'active_model/validator'
|
2009-12-28 19:15:39 -05:00
|
|
|
autoload :Callbacks
|
2011-12-28 10:38:16 -05:00
|
|
|
autoload :Configuration
|
2009-12-02 23:01:01 -05:00
|
|
|
autoload :Conversion
|
|
|
|
autoload :Dirty
|
2010-01-04 17:29:07 -05:00
|
|
|
autoload :EachValidator, 'active_model/validator'
|
2009-12-02 23:01:01 -05:00
|
|
|
autoload :Errors
|
|
|
|
autoload :Lint
|
2010-07-08 12:16:36 -04:00
|
|
|
autoload :MassAssignmentSecurity
|
2009-12-22 18:36:51 -05:00
|
|
|
autoload :Name, 'active_model/naming'
|
2009-12-02 23:01:01 -05:00
|
|
|
autoload :Naming
|
2009-12-22 18:36:51 -05:00
|
|
|
autoload :Observer, 'active_model/observing'
|
2009-12-02 23:01:01 -05:00
|
|
|
autoload :Observing
|
2010-12-18 16:38:05 -05:00
|
|
|
autoload :SecurePassword
|
2009-12-02 23:01:01 -05:00
|
|
|
autoload :Serialization
|
2010-01-04 17:29:07 -05:00
|
|
|
autoload :TestCase
|
2009-12-02 23:01:01 -05:00
|
|
|
autoload :Translation
|
|
|
|
autoload :Validations
|
|
|
|
autoload :Validator
|
2009-06-17 22:27:36 -04:00
|
|
|
|
|
|
|
module Serializers
|
2009-12-02 23:01:01 -05:00
|
|
|
extend ActiveSupport::Autoload
|
|
|
|
|
|
|
|
autoload :JSON
|
|
|
|
autoload :Xml
|
2009-06-17 22:27:36 -04:00
|
|
|
end
|
2009-03-19 19:28:59 -04:00
|
|
|
end
|
2009-03-20 17:40:37 -04:00
|
|
|
|
2009-12-27 18:17:44 -05:00
|
|
|
require 'active_support/i18n'
|
2009-03-20 17:40:37 -04:00
|
|
|
I18n.load_path << File.dirname(__FILE__) + '/active_model/locale/en.yml'
|