Sha256: ac906850ceecb7461f928aeab5a563448f5f7981d209322be11938a7091bbdc4
Contents?: true
Size: 624 Bytes
Versions: 1
Compression:
Stored size: 624 Bytes
Contents
module Id module Model class Form include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming def self.i18n_scope :id end def initialize(model) @model = model end def persisted? false end def to_model self end private def method_missing(name, *args, &block) model.send(name, *args, &block) end def memoize(f, &b) instance_variable_get("@#{f}") || instance_variable_set("@#{f}", b.call) end attr_reader :model end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
id-0.0.9 | lib/id/model/form.rb |