I have the following question. It sounds weird, but still. We all have app/views/say.rhtml or any other template for the view. It can include of course instructions in <% %> So the question is next -- is it possible to use .rhtml as a view which we just uploaded? I.e. user uploads his own .rhtml, controller saves it in the database, and shows the view using it. Is it possible at all? 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?hl=en -~----------~----~----~----~------~----~------~--~---
inrila wrote:> I.e. user uploads his own .rhtml, controller saves it in the database, > and shows the view using it. > > Is it possible at all?If you don''t mind the security nightmare, just use render :inline => MyModel.find(:whatever).your_rhtml Because that''s so high risk, even for internal development we use Lilu. Our graphic artists upload raw HTML, and Lilu installs the template stuff based only on id and class selectors into that HTML. -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Another way of doing this is with Liquid. It powers the Shopify commerce system. http://www.liquidmarkup.org/ On 9/21/07, Phlip <phlip2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > inrila wrote: > > > I.e. user uploads his own .rhtml, controller saves it in the database, > > and shows the view using it. > > > > Is it possible at all? > > If you don''t mind the security nightmare, just use > > render :inline => MyModel.find(:whatever).your_rhtml > > Because that''s so high risk, even for internal development we use Lilu. > Our > graphic artists upload raw HTML, and Lilu installs the template stuff > based > only on id and class selectors into that HTML. > > -- > Phlip > > > > >-- Nathaniel Steven Henry Brown 604-724-6624 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---