Sha256: 2d6f1c1221c3d9c1fd1d9ca6abcb8de6affd41df7b6ce13ef0cb418fb67007a6

Contents?: true

Size: 907 Bytes

Versions: 111

Compression:

Stored size: 907 Bytes

Contents

class Marty::ImportTypeView < Marty::Grid
  has_marty_permissions \
  create: :admin,
  read: :any,
  update: :admin,
  delete: :admin

  def configure(c)
    super

    c.title   = I18n.t('import_type', default: "ImportType")
    c.model   = "Marty::ImportType"
    c.attributes =
      [
       :name,
       :role__name,
       :db_model_name,
       :cleaner_function,
       :validation_function,
       :preprocess_function,
      ]
    c.store_config.merge!({sorters: [{property: :name, direction: 'ASC'}]})
  end

  attribute :name do |c|
    c.flex = 1
  end

  attribute :role__name do |c|
    c.width = 150
  end

  attribute :db_model_name do |c|
    c.flex = 1
  end

  attribute :cleaner_function do |c|
    c.flex = 1
  end

  attribute :validation_function do |c|
    c.flex = 1
  end

  attribute :preprocess_function do |c|
    c.flex = 1
  end
end

ImportTypeView = Marty::ImportTypeView

Version data entries

111 entries across 111 versions & 1 rubygems

Version Path
marty-2.5.2 app/components/marty/import_type_view.rb
marty-2.5.1 app/components/marty/import_type_view.rb
marty-2.5.0 app/components/marty/import_type_view.rb
marty-2.4.9 app/components/marty/import_type_view.rb
marty-2.4.8 app/components/marty/import_type_view.rb
marty-2.4.7 app/components/marty/import_type_view.rb
marty-2.4.6 app/components/marty/import_type_view.rb
marty-2.4.5 app/components/marty/import_type_view.rb
marty-2.4.4 app/components/marty/import_type_view.rb
marty-2.4.3 app/components/marty/import_type_view.rb
marty-2.4.2 app/components/marty/import_type_view.rb
marty-2.4.1 app/components/marty/import_type_view.rb
marty-2.4.0 app/components/marty/import_type_view.rb
marty-2.3.15 app/components/marty/import_type_view.rb
marty-2.3.14 app/components/marty/import_type_view.rb
marty-2.3.13 app/components/marty/import_type_view.rb
marty-2.3.12 app/components/marty/import_type_view.rb
marty-2.3.11 app/components/marty/import_type_view.rb
marty-2.3.10 app/components/marty/import_type_view.rb
marty-2.3.9 app/components/marty/import_type_view.rb