README.md in foundation_rails_helper-2.0.0 vs README.md in foundation_rails_helper-3.0.0.beta3
- old
+ new
@@ -7,29 +7,28 @@
So far it includes:
* A custom FormBuilder that generates a form using the Foundation framework classes. It replaces the current `form_for`, so there is no need to change your Rails code. Error messages are properly displayed.
-* A `display_flash_messages` helper method that uses Zurb Foundation Alerts UI.
+* A `display_flash_messages` helper method that uses Zurb Foundation Callout UI.
#### Compatibility
-* Only Rails 4.1/4.2/5 and Foundation 5 are fully supported
-* Some features may work with Foundation 4 and older, but results may vary, and markup which exists only for those versions will be gradually removed
-* Legacy branches exist for Rails 3 and 4.0 (see the rails3 and rails4.0 branches). These are not actively supported, and fixes are not retroactively applied, but pull requests are welcome.
-* We test against ruby versions 2.1 and up. This gem may still work fine on
- 1.9.3, but your mileage may vary
+* Only Rails 4.1/4.2/5, and Foundation 6 are fully supported
+* Some features may work with Foundation 5 and older, but results may vary, and markup which exists only for those versions will be gradually removed
+* Legacy branches exist for Rails 3, 4.0, and Foundation 5 (see the rails3, rails4.0, and foundation-5 branches). These are not actively supported, and fixes are not retroactively applied, but pull requests are welcome.
+* We test against ruby versions 2.1 and up. This gem may still work fine on 1.9.3, but your mileage may vary
## Screenshots
### Forms
A classic devise sign up view will look like this:
```erb
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
- <%= f.email_field :email, label: 'E-mail' %>
+ <%= f.email_field :email %>
<%= f.password_field :password %>
<%= f.password_field :password_confirmation %>
<%= f.submit %>
<% end %>
@@ -43,30 +42,30 @@
</tr>
</thead>
<tbody>
<tr>
<td valign='top'>
- <img src="https://cloud.githubusercontent.com/assets/1400414/5994195/d9b467ce-aa1e-11e4-914c-f696724b53ed.png"/>
+ <img src="https://cloud.githubusercontent.com/assets/1400414/18522106/8b981524-7a63-11e6-8450-0605cc310205.png"/>
</td>
<td valign='top'>
- <img src="https://cloud.githubusercontent.com/assets/1400414/5994196/dbf4bc0a-aa1e-11e4-8c18-b7d3b1b370dc.png"/>
+ <img src="https://cloud.githubusercontent.com/assets/1400414/18522107/8d0bfa24-7a63-11e6-8c0a-12757528b9ee.png"/>
</td>
</tr>
</tbody>
</table>
### Flash messages
-![Flash-message](https://cloud.githubusercontent.com/assets/393167/5845238/563dc094-a1b2-11e4-8548-2dd2950a60be.png "Flash-message")
+![Flash-message](https://cloud.githubusercontent.com/assets/1400414/18522256/3d13c97e-7a64-11e6-9ee2-33adc93cd573.png "Flash-message")
## Installation
Add this line to your application's Gemfile:
```ruby
-gem 'foundation-rails'
-gem 'foundation_rails_helper', '~> 1.2.0'
+gem 'foundation-rails', '~> 6.0' # required
+gem 'foundation_rails_helper', '>= 3.0.0.beta3', '< 4.0'
```
And then execute:
```bash
@@ -122,34 +121,34 @@
```ruby
f.text_field :name, label: 'Nombre', label_options: { class: 'large' }
```
-If the hint option is specified
+If the help_text option is specified
```ruby
-f.text_field :name, hint: "I'm a text field"
+f.text_field :name, help_text: "I'm a text field"
```
-an additional span element will be added after the input element:
+an additional p element will be added after the input element:
```html
-<span class="hint">I'm a text field</span>
+<p class="help-text">I'm a text field</p>
```
### Submit Button
-The 'submit' helper wraps the rails helper and sets the class attribute to "small radius success button" by default.
+The 'submit' helper wraps the rails helper and sets the class attribute to "success button" by default.
```ruby
f.submit
```
generates:
```html
-<input class="small radius success button" name="commit" type="submit" value="Create User">
+<input class="success button" name="commit" type="submit" value="Create User">
```
Specify the class option to override the default classes.
### Errors
@@ -161,13 +160,13 @@
```
generates:
```html
-<label class="error" for="user_email">Email</label>
-<input class="error" id="user_email" name="user[email]" type="email" value="">
-<small class="error">can't be blank</small>
+<label class="is-invalid-label" for="user_email">Email</label>
+<input class="is-invalid-input" id="user_email" name="user[email]" type="email" value="">
+<small class="form-error is-visible">can't be blank</small>
```
The class attribute of the 'small' element will mirror the class attribute of the 'input' element.
If the `html_safe_errors: true` option is specified on a field, then any HTML you may have embedded in a custom error string will be displayed with the html_safe option.
@@ -203,12 +202,12 @@
Currently supported options:
### Submit Button Class
To use a different class for the [submit button](https://github.com/sgruhier/foundation_rails_helper#submit-button) used in `form_for`, add a config named **button_class**:
```ruby
-# Default: 'small radius success button'
-config.button_class = 'large secondary button'
+# Default: 'success button'
+config.button_class = 'large hollow secondary button'
```
Please note, the button class can still be overridden by an options hash.
### Ignored Flash Keys
@@ -225,8 +224,6 @@
See the [CONTRIBUTING](CONTRIBUTING.md) file.
## Copyright
-Sébastien Gruhier (http://xilinus.com, http://v2.maptimize.com) - MIT LICENSE - 2015
-
-[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sgruhier/foundation_rails_helper/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
+Sébastien Gruhier (http://xilinus.com, http://v2.maptimize.com) - MIT LICENSE