Reputation: 1505
def change
change_column :customer, :email_text, :string, :default => 'First Line \n Second Line \n Third Line'
end
I'm trying to get this migration such that my default value for this column will work with new lines. When I use this field with simple_form as so:
<%= f.input :email_text, :as => :text, :label => 'E-Mail Text', %>
The newline characters are showing up as \n's instead of new lines. Anyone have any idea how I can get this to work?
Upvotes: 1
Views: 1270
Reputation: 6419
Another fine example of this ruby "gem":
1.9.3p327 :001 > '\n' == "\n"
=> false
Try it as:
:default => "First Line \n Second Line \n Third Line"
Upvotes: 2