Hello guys, i want to include file in another file for ex. i have a file _search.html.erb & index.html.erb _search include in index using <% render :partial => ''search''%> that''s no problem but i want to without underscore i mean (search.html.erb)include in index.html how this one possible. -- Posted via http://www.ruby-forum.com/.
I think you can do it using the render command. Check out the section "render a file" from the following link: http://api.rubyonrails.org/classes/ActionController/Base.html#M000658 Hope that helps, Jim http://www.thepeoplesfee.com/contribute On Wed, Aug 19, 2009 at 2:01 AM, Wap Addon <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hello guys, > > i want to include file in another file > > for ex. i have a file _search.html.erb & index.html.erb _search include > in index using <% render :partial => ''search''%> that''s no problem but i > want to without underscore i mean (search.html.erb)include in index.html > how this one possible. > -- > 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 -~----------~----~----~----~------~----~------~--~---
James Englert wrote:> I think you can do it using the render command. Check out the section > "render a file" from the following link: > > http://api.rubyonrails.org/classes/ActionController/Base.html#M000658 > > Hope that helps, > Jim > http://www.thepeoplesfee.com/contribute > > On Wed, Aug 19, 2009 at 2:01 AM, Wap Addon > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.orgi can not understood as per ur link if u have any example please give. -- Posted via http://www.ruby-forum.com/.
Something like this: render :file => "/path/to/some/template.erb" On Wed, Aug 19, 2009 at 8:23 AM, Wap Addon <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > James Englert wrote: > > I think you can do it using the render command. Check out the section > > "render a file" from the following link: > > > > http://api.rubyonrails.org/classes/ActionController/Base.html#M000658 > > > > Hope that helps, > > Jim > > http://www.thepeoplesfee.com/contribute > > > > On Wed, Aug 19, 2009 at 2:01 AM, Wap Addon > > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > > i can not understood as per ur link if u have any example please give. > -- > 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 -~----------~----~----~----~------~----~------~--~---
James Englert wrote:> Something like this: > > render :file => "/path/to/some/template.erb" > > > > On Wed, Aug 19, 2009 at 8:23 AM, Wap Addon > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.orgthanks now it is working thanks a lot -- Posted via http://www.ruby-forum.com/.