Sha256: c5b20430dc058b3326332f656c47fc1c1ed784cd7f7933e44618b21043a25c03
Contents?: true
Size: 685 Bytes
Versions: 6
Compression:
Stored size: 685 Bytes
Contents
# This is the module which makes any class behave like ActiveModel. module Basepack module Model extend ActiveSupport::Concern included do extend ActiveModel::Callbacks include ActiveModel::Model include ActiveModel::Serialization include ActiveModel::ForbiddenAttributesProtection include ActiveModel::AttributeMethods include ActiveModel::Dirty end # Always return true so when using form_for, the default method will be post. def new_record? true end # Always return nil so when using form_for, the default method will be post. def id nil end def destroyed? true end end end
Version data entries
6 entries across 6 versions & 1 rubygems