Bob Sanders
2007-Oct-01 02:13 UTC
Replacing "<contact-form>" with Partial _contact_form.rhtml
<%= @website_page.description.replace("what", :partial => "punam") %> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Bob Sanders
2007-Oct-01 02:15 UTC
Re: Replacing "<contact-form>" with Partial _contact_form.rh
Bob Sanders wrote:> > > <%= @website_page.description.replace("what", :partial => "punam") %>Accidentally hit the return. My apologies! Please disregard the above. If I wanted to replace the tag "<contact-form>" with the partial named _contact_form.rhtml (:contact_form), how would I do so? I thought it could work something like this: <%= @website_page.description.gsub("<contact-form>", :partial => "contact_form") %> but then I got some errors with trying to replace a string with a hash. Any ideas? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---