rails text_field slight associated
i'm carrying problem emanate text_field but slight association. maybe i even don't need :-)
i have twin radio_buttons compared same method:
<%= radio_button :comment, :author, "anonymous" %> opposite <br>
<%= radio_button :comment, :author, "real_name" %> name <br>
what i have an text_field user click radio_button "real_name" i establish value new text_field.
basically controller something like:
@comment = comment.new(params[:comment])
if @comment.author == "real_name"
@comment.author = "value-from-the-new-textfield
end
there any proceed it?
regards,
victor
Comments
Post a Comment