Sha256: 088055b484683f8e3a94f8f93d229e6b2092d8f2dd2e57adfdddf8cc3ce0c0bd
Contents?: true
Size: 463 Bytes
Versions: 24
Compression:
Stored size: 463 Bytes
Contents
class Flexite::BaseForm include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming attr_reader :attributes def initialize(attributes = {}) @attributes = HashWithIndifferentAccess.new attributes.each do |name, value| send("#{name}=", value) rescue next @attributes[name] = value end end def persisted? respond_to?(:id) && id.present? end def new_record? !persisted? end end
Version data entries
24 entries across 24 versions & 1 rubygems