I have data in my database that I want processed like rhtml. Can I do that? I''m saving my site content in there, and suddenly thought it would be brilliant to show "<%= "You are logged in as #{@user.username}." %>" and other stuff. Is this possible/easy? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
kopf1988 wrote:> I have data in my database that I want processed like rhtml. Can I do > that? I''m saving my site content in there, and suddenly thought it > would be brilliant to show "<%= "You are logged in as > #{@user.username}." %>" and other stuff. Is this possible/easy?It is possible. See the Globalize plugin for details on how to do it. -- 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 -~----------~----~----~----~------~----~------~--~---
Is there an... easier way to do it? Installing plugins is a pain on shared hosts. On Jan 19, 9:13 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> kopf1988 wrote: > > I have data in my database that I want processed like rhtml. Can I do > > that? I''m saving my site content in there, and suddenly thought it > > would be brilliant to show "<%= "You are logged in as > > #...@user.username}." %>" and other stuff. Is this possible/easy? > > It is possible. See the Globalize plugin for details on how to do it. > -- > 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 -~----------~----~----~----~------~----~------~--~---
No it''s not. Go into your Rails directory and run: script/plugin install http://www.yourrepos.com/plugin_directory Plugins are local to your Rails application directory so being on shared hosting shouldn''t affect them at all. --Jeremy On Jan 19, 2008 10:19 PM, kopf1988 <kopf1988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Is there an... easier way to do it? Installing plugins is a pain on > shared hosts. > > On Jan 19, 9:13 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > kopf1988 wrote: > > > I have data in my database that I want processed like rhtml. Can I do > > > that? I''m saving my site content in there, and suddenly thought it > > > would be brilliant to show "<%= "You are logged in as > > > #...@user.username}." %>" and other stuff. Is this possible/easy? > > > > It is possible. See the Globalize plugin for details on how to do it. > > -- > > Posted viahttp://www.ruby-forum.com/. > > > >-- http://www.jeremymcanally.com/ My books: Ruby in Practice http://www.manning.com/mcanally/ My free Ruby e-book http://www.humblelittlerubybook.com/ My blogs: http://www.mrneighborly.com/ http://www.rubyinpractice.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 -~----------~----~----~----~------~----~------~--~---
No command line access... Besides, Globalization is something that has features absolutely trivial to my purpose. Isn''t there something specific to that? I really hate to install a bunch of stuff just to get one tiny little feature out of it. On Jan 19, 9:23 pm, "Jeremy McAnally" <jeremymcana...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> No it''s not. Go into your Rails directory and run: > > script/plugin installhttp://www.yourrepos.com/plugin_directory > > Plugins are local to your Rails application directory so being on > shared hosting shouldn''t affect them at all. > > --Jeremy > > On Jan 19, 2008 10:19 PM, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Is there an... easier way to do it? Installing plugins is a pain on > > shared hosts. > > > On Jan 19, 9:13 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > > kopf1988 wrote: > > > > I have data in my database that I want processed like rhtml. Can I do > > > > that? I''m saving my site content in there, and suddenly thought it > > > > would be brilliant to show "<%= "You are logged in as > > > > #...@user.username}." %>" and other stuff. Is this possible/easy? > > > > It is possible. See the Globalize plugin for details on how to do it. > > > -- > > > Posted viahttp://www.ruby-forum.com/. > > --http://www.jeremymcanally.com/ > > My books: > Ruby in Practicehttp://www.manning.com/mcanally/ > > My free Ruby e-bookhttp://www.humblelittlerubybook.com/ > > My blogs:http://www.mrneighborly.com/http://www.rubyinpractice.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 -~----------~----~----~----~------~----~------~--~---
kopf1988 wrote:> Is there an... easier way to do it? Installing plugins is a pain on > shared hosts. > > On Jan 19, 9:13 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>I was not suggesting that you use Globalize, only that if you wish to see how a database driven user interface is implemented then this is the most comprehensive example for Rails that I am aware of. You can examine it to determine how various features are enabled in code and then adopt/adapt whatever parts you deem meet your specific desires. At a minimum you must wrap all application text strings that are presented to the user in some form of method that will perform the lookup and return from the database backend. -- 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 -~----------~----~----~----~------~----~------~--~---
Right, right. But rails doesn''t come with something simple like this?? render :rhtml => "Text string. <%= @something.words %>" On Jan 19, 9:31 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> kopf1988 wrote: > > Is there an... easier way to do it? Installing plugins is a pain on > > shared hosts. > > > On Jan 19, 9:13 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > I was not suggesting that you use Globalize, only that if you wish to > see how a database driven user interface is implemented then this is the > most comprehensive example for Rails that I am aware of. You can > examine it to determine how various features are enabled in code and > then adopt/adapt whatever parts you deem meet your specific desires. > > At a minimum you must wrap all application text strings that are > presented to the user in some form of method that will perform the > lookup and return from the database backend. > -- > 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 -~----------~----~----~----~------~----~------~--~---
kopf1988 wrote:> Installing plugins is a pain on shared hosts. >I can see gems being a PITA but why so for plugins? They go directly into your project and as far as the host is concerned they are part of your project, no different than any code that you write yourself. -- 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 -~----------~----~----~----~------~----~------~--~---
Hmmm... maybe they won''t be so hard then, I''ll have to try. Oh, and I found the answer!!! render :inline Unless that''s a bad idea, lol, but it''s just going to be used to render my webpages layouts which I can handily store in the database now. On Jan 19, 9:34 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> kopf1988 wrote: > > Installing plugins is a pain on shared hosts. > > I can see gems being a PITA but why so for plugins? They go directly > into your project and as far as the host is concerned they are part of > your project, no different than any code that you write yourself. > > -- > 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 -~----------~----~----~----~------~----~------~--~---
felipekk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Jan-20 09:55 UTC
Re: I know I''m crazy but
Just remember, doing this means that someone will have an easy way to executing arbitrary ruby code on your website in case they get access to the database. (Which is, of course, a major security flaw). On Jan 19, 7:37 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hmmm... maybe they won''t be so hard then, I''ll have to try. > > Oh, and I found the answer!!! > > render :inline > > Unless that''s a bad idea, lol, but it''s just going to be used to > render my webpages layouts which I can handily store in the database > now. > > On Jan 19, 9:34 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > kopf1988 wrote: > > > Installing plugins is a pain on shared hosts. > > > I can see gems being a PITA but why so for plugins? They go directly > > into your project and as far as the host is concerned they are part of > > your project, no different than any code that you write yourself. > > > -- > > 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
whats wrong with render :text => "Text string. " + @something.words -- 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 -~----------~----~----~----~------~----~------~--~---