Sha256: 4a74beff9de8016b2d232191d90dd1e9769b1807b27878a56daf3c4ca6e94313

Contents?: true

Size: 409 Bytes

Versions: 7

Compression:

Stored size: 409 Bytes

Contents

require "rails/generators"

module Suspenders
  class FormsGenerator < Rails::Generators::Base
    def add_simple_form
      gem "simple_form"
      Bundler.with_clean_env { run "bundle install" }
    end

    def configure_simple_form
      create_file "config/initializers/simple_form.rb" do
        "SimpleForm.setup {|config|}"
      end

      generate "simple_form:install", "--force"
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
suspenders-1.50.0 lib/suspenders/generators/forms_generator.rb
suspenders-1.49.0 lib/suspenders/generators/forms_generator.rb
suspenders-1.48.0 lib/suspenders/generators/forms_generator.rb
welaika-suspenders-2.29.0.alpha.2 lib/suspenders/generators/forms_generator.rb
welaika-suspenders-2.29.0.alpha.1 lib/suspenders/generators/forms_generator.rb
suspenders-1.47.0 lib/suspenders/generators/forms_generator.rb
suspenders-1.46.0 lib/suspenders/generators/forms_generator.rb