I have a HAML textarea that I want to fill with with data from a Sinatra
model. And then let the user update and save it.
Since HAML currently doesn't seem to support text areas, I am using the
following workaround: ~ "<textarea>#{@book_mark.inlaegg}</textarea>"
Which does indeed bring up a textarea with text from the model.
The only problem is that the text does not get saved. with the following
model code:
post '/bookmarks/' do
inlaegg = params[:inlaegg]
etc...
Don't I need to add additional metadata to the textarea in my view, along
the lines of: %input{:type => "textarea", :name => "inlaegg", :id =>
"inlaegg", :value => "#{@book_mark.inlaegg}"}
How do I do this, given that I have to use the ~
"<textarea>#{@book_mark.inlaegg}</textarea>" construct in HAML?
The model works fine to save date from ordinary text fields. My question
only pertains to data in a textarea.
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/haml?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.