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.3.0 lib/muck-engine/models/general.rb
muck-engine-3.2.10 lib/muck-engine/models/general.rb
muck-engine-3.2.9 lib/muck-engine/models/general.rb
muck-engine-3.2.8 lib/muck-engine/models/general.rb
muck-engine-3.2.7 lib/muck-engine/models/general.rb
muck-engine-3.2.6 lib/muck-engine/models/general.rb
muck-engine-3.2.5 lib/muck-engine/models/general.rb
muck-engine-3.2.4 lib/muck-engine/models/general.rb
muck-engine-3.2.3 lib/muck-engine/models/general.rb
muck-engine-3.2.1 lib/muck-engine/models/general.rb
muck-engine-3.2.0 lib/muck-engine/models/general.rb
muck-engine-3.1.0 lib/muck-engine/models/general.rb
muck-engine-3.0.8 lib/muck-engine/models/general.rb
muck-engine-3.0.7 lib/muck-engine/models/general.rb
muck-engine-3.0.6 lib/muck-engine/models/general.rb
muck-engine-3.0.5 lib/muck-engine/models/general.rb
muck-engine-3.0.4 lib/muck-engine/models/general.rb
muck-engine-3.0.3 lib/muck-engine/models/general.rb