Sha256: 1c72c2e1e23557295620d8bcaa6c2cbab8d9bf2c8807a6cf73ce00f0d76201bf
Contents?: true
Size: 480 Bytes
Versions: 38
Compression:
Stored size: 480 Bytes
Contents
module MuckEngine module General extend ActiveSupport::Concern def dom_id(prefix='') display_id = new_record? ? "new" : id.to_s prefix.to_s <<( '_') unless prefix.blank? prefix.to_s << "#{self.class.name.underscore}" prefix != :bare ? "#{prefix.to_s.underscore}_#{display_id}" : display_id end def errors_to_s errors.map do |e, m| "#{e.humanize unless e == "base"} #{m}\n" end.to_s.chomp end end end
Version data entries
38 entries across 38 versions & 1 rubygems