Friday, 6 September 2013

Ruby on Rails - adding a string in front of a parameter for a from

Ruby on Rails - adding a string in front of a parameter for a from

I want to add a string in front of a paramemter on my form so that when
the user submits something on the form my client will get an email saying
Hello from [:username]
so ive tried this in my view
= f.text_field "Hello From, #{:username}"
but it does not work
i;ve also tried to use a value
= f.text_field :subject, value: "Hello From, #{:username}"
but that doesent work either

No comments:

Post a Comment