Skip to content
This repository

render fields_for once #129

tbohr opened this Issue · 3 comments

4 participants

Torben Bohr Henrikas Elsbergas David Southard Sergey Nartimov
Torben Bohr


can you give me a hint how i render "fields_for" subform once if model is empty?
A user has to click once before he can fill the form....

Is it better with jQuery or ruby?


Henrikas Elsbergas

In your controller add
def new
@record =
1.time { }

David Southard

not trolling but I think this supposed to be 1.times not 1.time at least in Ruby 1.9.3-p125.

Sergey Nartimov
lest commented

@tbohr You can build records in the controller like @netyciukas suggested.

Sergey Nartimov lest closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.