Skip to content

Commit

Permalink
Instead of using custom config, use the simple_form generator
Browse files Browse the repository at this point in the history
This allows users to customize the forms layout.
  • Loading branch information
jcoyne committed Apr 28, 2016
1 parent accc839 commit d6cd82b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 31 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ To use add to your gemfile:
gem 'hydra-editor'
```

Then run:
```
bundle install
```

Next generate the bootstrap form layouts:
```
rails generate simple_form:install --bootstrap
```

And to config/routes.rb add:

```ruby
Expand Down
31 changes: 0 additions & 31 deletions config/initializers/simple_form.rb

This file was deleted.

1 change: 1 addition & 0 deletions lib/hydra_editor/engine.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module HydraEditor
class Engine < ::Rails::Engine
require 'simple_form'
engine_name 'hydra_editor'
config.eager_load_paths += %W(
#{config.root}/app/helpers/concerns
Expand Down
5 changes: 5 additions & 0 deletions spec/test_app_templates/lib/generators/test_app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def add_gems
end
end

def run_simple_form_generator
say_status("warning", "GENERATING BL", :yellow)
generate "simple_form:install --bootstrap"
end

def run_blacklight_generator
say_status("warning", "GENERATING BL", :yellow)
generate "blacklight:install --devise"
Expand Down

0 comments on commit d6cd82b

Please sign in to comment.