Sha256: 5f9c16c4a7a14a005b48eba5be01890871c782acfb7ea91038b8896c18139493

Contents?: true

Size: 617 Bytes

Versions: 34

Compression:

Stored size: 617 Bytes

Contents

module Scaffolding
  mattr_accessor :database, default: :postgresql

  def self.mysql?
    database == :mysql
  end

  def self.valid_attribute_type?(type)
    [
      "boolean",
      "buttons",
      "cloudinary_image",
      "color_picker",
      "date_and_time_field",
      "date_field",
      "email_field",
      "emoji_field",
      "file_field",
      "options",
      "password_field",
      "phone_field",
      "super_select",
      "text_area",
      "text_field",
      "trix_editor"
    ].include?(type.gsub(/{.*}/, "")) # Pop off curly brackets such as `super_select{class_name=Membership}`
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
bullet_train-super_scaffolding-1.2.11 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.10 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.9 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.8 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.7 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.6 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.5 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.4 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.3 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.2 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.1 lib/scaffolding.rb
bullet_train-super_scaffolding-1.2.0 lib/scaffolding.rb
bullet_train-super_scaffolding-1.1.15 lib/scaffolding.rb
bullet_train-super_scaffolding-1.1.14 lib/scaffolding.rb
bullet_train-super_scaffolding-1.1.13 lib/scaffolding.rb
bullet_train-super_scaffolding-1.1.12 lib/scaffolding.rb
bullet_train-super_scaffolding-1.1.11 lib/scaffolding.rb
bullet_train-super_scaffolding-1.1.10 lib/scaffolding.rb
bullet_train-super_scaffolding-1.1.9 lib/scaffolding.rb
bullet_train-super_scaffolding-1.1.8 lib/scaffolding.rb