Sha256: fcf1e548518d663190a1d683e7197c42f8edaea256326409ca42b15b46252add
Contents?: true
Size: 1.26 KB
Versions: 5
Compression:
Stored size: 1.26 KB
Contents
require "madmin/engine" require "pagy" module Madmin autoload :Field, "madmin/field" autoload :GeneratorHelpers, "madmin/generator_helpers" autoload :Resource, "madmin/resource" module Fields autoload :Boolean, "madmin/fields/boolean" autoload :Integer, "madmin/fields/integer" autoload :String, "madmin/fields/string" autoload :Text, "madmin/fields/text" autoload :Date, "madmin/fields/date" autoload :DateTime, "madmin/fields/date_time" autoload :Decimal, "madmin/fields/decimal" autoload :Json, "madmin/fields/json" autoload :Enum, "madmin/fields/enum" autoload :Float, "madmin/fields/float" autoload :Time, "madmin/fields/time" autoload :BelongsTo, "madmin/fields/belongs_to" autoload :Polymorphic, "madmin/fields/polymorphic" autoload :HasMany, "madmin/fields/has_many" autoload :HasOne, "madmin/fields/has_one" autoload :RichText, "madmin/fields/rich_text" autoload :Attachment, "madmin/fields/attachment" autoload :Attachments, "madmin/fields/attachments" end mattr_accessor :resources, default: [] class << self def resource_for(object) Rails.application.eager_load! klass_name = object.class.name Madmin.resources.find { |r| r.model_name == klass_name } end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
madmin-1.0.2 | lib/madmin.rb |
madmin-1.0.1 | lib/madmin.rb |
madmin-1.0.0 | lib/madmin.rb |
madmin-1.0.0.beta2 | lib/madmin.rb |
madmin-1.0.0.beta1 | lib/madmin.rb |