Hai guys I have one question to all the experts in Rails That question is ,I have one HTML file with some css attached in my rails root. I need to display that HTML file in our RHTML file can you tell me the answer? Ok Bye By P.S.Hussain -- 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 -~----------~----~----~----~------~----~------~--~---
The problem as stated is harder than it needs to be. If the HTML content could be placed in a file under the views directory tree, and the name starts with an "_" then just render :partial => ... If it needs to reside there you can always provide the full path name to the render method, or use render :text => ... after reading the file into memory. Michael On Jun 15, 11:49 pm, hussain <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hai guys > I have one question to all the experts in Rails > That question is ,I have one HTML file with some css attached in my > rails root. > I need to display that HTML file in our RHTML file > can you tell me the answer? > Ok > Bye > By > P.S.Hussain > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
What you really need is your html file moved somewhere under app/ views, renamed to _htmlfile.rhtml and rendered as partial in your rhtml template, like <%= render :partial => ''htmlfile'' %> or something. Possibly, but unlikely, I am missing some very unusual need to keep things as you did, more detailed explanation would help make things clearer. Don''t try to provide abstract description, better try to be as specific as it ever possible, or you''ll get lots of answers barely applicable to your case. On Jun 16, 9:49 am, hussain <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hai guys > I have one question to all the experts in Rails > That question is ,I have one HTML file with some css attached in my > rails root. > I need to display that HTML file in our RHTML file > can you tell me the answer? > Ok > Bye > By > P.S.Hussain > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---