aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/model.rb
blob: 9228d540158c4bd776dc3504dc856f9bea6bd35a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module ActiveModel
  module Model
    def self.included(base)
      base.class_eval do
        extend  ActiveModel::Naming
        extend  ActiveModel::Translation
        include ActiveModel::Validations
        include ActiveModel::Conversion
      end
    end

    def initialize(params={})
      params.each do |attr, value|
        self.send(:"#{attr}=", value)
      end if params
    end

    def persisted?
      false
    end
  end
end