Update README.md line 458
Hey there. Love the gem. I'm new to Rails (and OO programming in general) so I can easily get hung up on a small detail that a pro wouldn't. I was stuck for several hours on a project simply because I didn't add the block variable to the simple_fields_for method. This is because in your documentation on line 458, your example doesn't have the block variable added either. I had to scour the interwebs for the solution. I stumbled across the solution and ss soon as I added that variable, BOOM!..everything worked to perfection. Anyway, maybe this will help...maybe it won't and I'm just off my rocker. But thanks for a great gem and thanks for taking the time to read this.
This commit is contained in:
parent
15dc96fc44
commit
d8bff68cbd
|
@ -455,7 +455,7 @@ Rails helper, but change the builder to use the `SimpleForm::FormBuilder`.
|
|||
|
||||
```ruby
|
||||
form_for @user do |f|
|
||||
simple_fields_for :posts do |posts_form|
|
||||
f.simple_fields_for :posts do |posts_form|
|
||||
# Here you have all simple_form methods available
|
||||
posts_form.input :title
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue