I would love a full drop-in answer (hand me a fish), but I this might be
a
matter of pointing me to where I need to RTFM (teach me to fish).
I have a form with a text_area:
<%= f.text_area :modified_strategy, :options=>{:cols => 80} %>
the string represented by :modify_strategy is comprised of a pattern:
;;;
This string is a representation of what was originally three lines with
“\n”.
So to properly render them in a text_area I would want to do something
like:
gsub(";","\n")
and then reverse this in the Model before_save.
Unfortunately something as simple as
… :modifed_strategy.gsub(";", “\n”) …
returns an error:
undefined method `gsub’ for :modified_strategy:Symbol
How do I change “;” to “\n” on the string represented by
:modified_strategy?
Where to next because I guess I’m really missing something about Symbols
or
Views.