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

Version Path
muck-engine-3.5.0 lib/muck-engine/models/general.rb
muck-engine-3.4.0 lib/muck-engine/models/general.rb
muck-engine-3.3.18 lib/muck-engine/models/general.rb
muck-engine-3.3.17 lib/muck-engine/models/general.rb
muck-engine-3.3.16 lib/muck-engine/models/general.rb
muck-engine-3.3.15 lib/muck-engine/models/general.rb
muck-engine-3.3.14 lib/muck-engine/models/general.rb
muck-engine-3.3.13 lib/muck-engine/models/general.rb
muck-engine-3.3.12 lib/muck-engine/models/general.rb
muck-engine-3.3.11 lib/muck-engine/models/general.rb
muck-engine-3.3.10 lib/muck-engine/models/general.rb
muck-engine-3.3.9 lib/muck-engine/models/general.rb
muck-engine-3.3.8 lib/muck-engine/models/general.rb
muck-engine-3.3.7 lib/muck-engine/models/general.rb
muck-engine-3.3.6 lib/muck-engine/models/general.rb
muck-engine-3.3.5 lib/muck-engine/models/general.rb
muck-engine-3.3.4 lib/muck-engine/models/general.rb
muck-engine-3.3.3 lib/muck-engine/models/general.rb
muck-engine-3.3.2 lib/muck-engine/models/general.rb
muck-engine-3.3.1 lib/muck-engine/models/general.rb