create entry using another entry

Mike C
Wed, 01 Apr 2009 22:26:55 -0000

I''m wondering what the best practice way to do this is. Basically, I
have a Snippet model containing a text field of type text and a Story
model also with a text field of type text. At some point, I want to
make a story entry using a snippet entry''s text.

Passing this using new_story_path(:snippet => @snippet.text) is
troublesome since it passes it through the URL and also is limited to
a certain number of characters. I thought of using another post method
but that seems to go against RESTful practices since new should be a
get action. I also thought of creating a method in the Story model to
take a Snippet object and create the new entry by extracting the
information through the snippet entry. Are there any better ways of
doing this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---