I have two separate questions:
First question: I want to migrate an app that uses rhtml and rjs to
haml. To do this effectively, I was hoping I could call my rhtml
partials from haml. So far, no success. Anybody do this successfully?
= render(:partial => ''foo'')
gives me the `find_template_extension_for'': No rhtml, rxml, rjs or
delegate template found
Second question: Is there any way to intersperse Ruby into template
other than in an = code injector. For example, is there a better way
to write this?
= "Hello, #{@person.first_name} #{@person.last_name}"
I''m not saying this is any worse than a sea of <%= %>. I was just
wondering whether this is the best approach.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
hcatlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-28 19:01 UTC
Re: HAML: Migrating Slowly?
That''s an extremely odd error. We use mixed-type partials all the time in our production code. So, I''m not sure what might be causing that error. In fact, when you call render, your directly referencing ActionView::Base.render.... something that HAML is not really involved with (except as being one of the delegate renderers). What happens if you are more explicit with your call? = render :partial => "controller/foo.rhtml" Does that do anything different? Also, I tend to do this in your example %p Hello, = @person.full_name Hope this helps. -hampton. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Different but not better. Does this help any? action_view/partials.rb:125:in `instance_variable_get'': `@tag_cloud.rhtml'' is not allowed as an instance variable name> What happens if you are more explicit with your call? > > = render :partial => "controller/foo.rhtml" > > Does that do anything different? >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---