Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Simple Form Logo](https://raw.github.com/heartcombo/simple_form/main/simple_form.png)

[![Gem Version](https://fury-badge.herokuapp.com/rb/simple_form.png)](http://badge.fury.io/rb/simple_form)
[![Gem Version](https://badge.fury.io/rb/simple_form.svg)](https://badge.fury.io/rb/simple_form)

Rails forms made easy.

Expand Down Expand Up @@ -70,7 +70,7 @@ rails generate simple_form:install

### Bootstrap 5

**Simple Form** can be easily integrated with [Bootstrap 5](http://getbootstrap.com/).
**Simple Form** can be easily integrated with [Bootstrap 5](https://getbootstrap.com/).
Use the `bootstrap` option in the install generator, like this:

```console
Expand All @@ -79,16 +79,15 @@ rails generate simple_form:install --bootstrap

This will add an initializer that configures **Simple Form** wrappers for
Bootstrap 5's [form controls](https://getbootstrap.com/docs/5.0/forms/overview/).
You have to be sure that you added a copy of the [Bootstrap](http://getbootstrap.com/)
You have to be sure that you added a copy of the [Bootstrap](https://getbootstrap.com/)
assets on your application.

For more information see the generator output, our
[example application code](https://github.com/heartcombo/simple_form-bootstrap) and
[the live example app](https://simple-form-bootstrap.herokuapp.com/).
[example application code](https://github.com/heartcombo/simple_form-bootstrap).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been going back-and-forth with removing this, vs trying to get an app up and running somewhere else... even attempted it but ran into weird issues and out of time to try further, so I guess I'll just bite the bullet and remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm successfully using render at the moment, but it appears that they are fingerprinting urls now :(

Did you try that?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Yes I did try render, and I ran into a few different issues, fixed them as I went, but the last one was this with assets precompile:

JSON::ParserError: unexpected character: '::render::starttraceinternal::in' at line 1 column 1 (JSON::ParserError)

Which led me to run out of the 512mb memory limit on the free instance when accessing the app 😅 , presumably because it was trying to compile the assets during the request. Anyway, I ran out of time and need to circle back on it, continue on render or try somewhere else.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of unexpected, https://github.com/diowa/ruby3-rails7-bootstrap-heroku is deployed on render with a far-from-being-lightweight asset pipeline: node + shakapacker + webpack

I would like to take a look on the other repo during the weekend (without guarantees)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @carlosantoniodasilva,

feel free to take a look at tagliala/simple_form-bootstrap#1

Test deploy: https://simple-form-bootstrap-test.onrender.com/examples/vertical

Three things should be done on Render:

  • Remove "test" from the service name to generate simple-form-bootstrap
  • Autogenerate secret key
  • Autogenerate (or disable) rails master key (useless)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll take a look.

I was really trying to avoid having specific render files in the repo tbh, and trying to set it up directly from Render, but maybe that's why I ran into the issues 🤷


### Zurb Foundation 5

To generate wrappers that are compatible with [Zurb Foundation 5](http://foundation.zurb.com/), pass
To generate wrappers that are compatible with [Zurb Foundation 5](https://get.foundation/sites/docs-v5/), pass
the `foundation` option to the generator, like this:

```console
Expand All @@ -99,7 +98,7 @@ Please note that the Foundation wrapper does not support the `:hint` option by d
enable hints, please uncomment the appropriate line in `config/initializers/simple_form_foundation.rb`.
You will need to provide your own CSS styles for hints.

Please see the [instructions on how to install Foundation in a Rails app](http://foundation.zurb.com/docs/applications.html).
Please see the [instructions on how to install Foundation in a Rails app](https://get.foundation/sites/docs-v5/applications.html).

### Country Select

Expand Down Expand Up @@ -337,7 +336,7 @@ end
</form>
```

To view the actual RDocs for this, check them out here - http://rubydoc.info/github/heartcombo/simple_form/main/SimpleForm/FormBuilder:input_field
To view the actual RDocs for this, check them out here - https://rubydoc.info/github/heartcombo/simple_form/main/SimpleForm/FormBuilder:input_field

### Collections

Expand Down Expand Up @@ -378,7 +377,7 @@ If you want to change this behavior you must make it explicit, like this:
<% end %>
```

All other options given are sent straight to the underlying Rails helper(s): [`collection_select`](http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_select), [`collection_check_boxes`](http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_check_boxes), [`collection_radio_buttons`](http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_radio_buttons). For example, you can pass `prompt` and `selected` as:
All other options given are sent straight to the underlying Rails helper(s): [`collection_select`](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_select), [`collection_check_boxes`](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_check_boxes), [`collection_radio_buttons`](https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_radio_buttons). For example, you can pass `prompt` and `selected` as:

```ruby
f.input :age, collection: 18..60, prompt: "Select your age", selected: 21
Expand Down Expand Up @@ -1306,7 +1305,7 @@ end

You can view the **Simple Form** documentation in RDoc format here:

http://rubydoc.info/github/heartcombo/simple_form/main/frames
https://rubydoc.info/github/heartcombo/simple_form/main/frames

### Supported Ruby / Rails versions

Expand Down