Unbound form append to original message

Hi, I want to replace my standard (edit/update) form, with one that displays the entire record as readonly (I’ve done this so far) and want to add an additional field (message 2) which I would pass along to the controller and merge that with the original message.

I guess i can create a new route to the controller called ‘append’ or something and combine the two message text boxes there.

Or, is there another way to go about it?

Maybe it would be better if the message was a separate, related object. Think of this like a Blog post and any number of Comments. Then it would be trivial to have a list of previous messages shown as uneditable static text, and a field to add another message at the end of that. The way you’re heading in your question above, you’d either need to keep mutating a single string value (do-able, but hardly a good idea – google race condition for one objection) or you’d need a very wide table with lots of extra fields that only some records would use.


This forum category (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it.

For support issues or usage questions that are not issues with Rails itself, please post to the rubyonrails-talk category or somewhere like StackOverflow using the ruby-on-rails tag. You can also drop in to the #rubyonrails channel on irc.freenode.net for realtime help. You’ll be more likely to get a quick answer using one of those options.

ok, thanks. I thought I maybe should seperate them.