I wanted to take auto_link method for a ride but in script/console I get the message that "undefined method ''tag_options''". What do I need to include in order to run auto_link("ruby on rails") on ruby script/console? -=- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 7/12/07, Neeraj Kumar <neeraj.jsr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I wanted to take auto_link method for a ride but in script/console I get the > message that "undefined method ''tag_options''". > > What do I need to include in order to run auto_link("ruby on rails") on ruby > script/console?include ActionView::Helpers::TagHelper or, use the little "helper" thingy, and you don''t have to worry about including stuff:>> helper.auto_link("ruby on rails")=> "ruby on rails" --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jul 12, 2007, at 10:21 AM, Bob Showalter wrote:> On 7/12/07, Neeraj Kumar <neeraj.jsr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> I wanted to take auto_link method for a ride but in script/console >> I get the >> message that "undefined method ''tag_options''". >> >> What do I need to include in order to run auto_link("ruby on >> rails") on ruby >> script/console? > > include ActionView::Helpers::TagHelper > > or, use the little "helper" thingy, and you don''t have to worry about > including stuff: > >>> helper.auto_link("ruby on rails") > => "ruby on rails"Loading production environment. >> helper.auto_link("please visit http://agileconsultingllc.com for more information") => "please visit <a href=\"http://agileconsultingllc.com\">http:// agileconsultingllc.com</a> for more information" Hey thanks! That''s a fantastic tip! -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Question is if I do just pluralize(2,"person") in script/console without using helper or including anything , it works by default. While auto_link("www.rubyonrails.org") chokes with error. Why this discrepancy. Why pluralize method is automatically loaded. -=- On 7/12/07, Rob Biedenharn <Rob-GBZH0y1GwQfnZcttdmLDtcI/UQi/AW5J@public.gmane.org> wrote:> > > On Jul 12, 2007, at 10:21 AM, Bob Showalter wrote: > > On 7/12/07, Neeraj Kumar <neeraj.jsr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I wanted to take auto_link method for a ride but in script/console > >> I get the > >> message that "undefined method ''tag_options''". > >> > >> What do I need to include in order to run auto_link("ruby on > >> rails") on ruby > >> script/console? > > > > include ActionView::Helpers::TagHelper > > > > or, use the little "helper" thingy, and you don''t have to worry about > > including stuff: > > > >>> helper.auto_link("ruby on rails") > > => "ruby on rails" > > Loading production environment. > >> helper.auto_link("please visit http://agileconsultingllc.com for > more information") > => "please visit <a href=\"http://agileconsultingllc.com\">http:// > agileconsultingllc.com</a> for more information" > > Hey thanks! That''s a fantastic tip! > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jul 12, 2007, at 4:33 PM, Neeraj Kumar wrote:> On 7/12/07, Rob Biedenharn < Rob-GBZH0y1GwQfnZcttdmLDtcI/UQi/AW5J@public.gmane.org> wrote: > > On Jul 12, 2007, at 10:21 AM, Bob Showalter wrote: > > On 7/12/07, Neeraj Kumar <neeraj.jsr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I wanted to take auto_link method for a ride but in script/console > >> I get the > >> message that "undefined method ''tag_options''". > >> > >> What do I need to include in order to run auto_link("ruby on > >> rails") on ruby > >> script/console? > > > > include ActionView::Helpers::TagHelper > > > > or, use the little "helper" thingy, and you don''t have to worry > about > > including stuff: > > > >>> helper.auto_link("ruby on rails") > > => "ruby on rails" > > Loading production environment. > >> helper.auto_link("please visit http://agileconsultingllc.com for > more information") > => "please visit <a href=\"http://agileconsultingllc.com\ ">http:// > agileconsultingllc.com</a> for more information" > > Hey thanks! That''s a fantastic tip! > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org >> Question is if I do just > > pluralize(2,"person") in script/console without using helper or > including anything , it works by default. While auto_link > ("www.rubyonrails.org ") chokes with error. Why this discrepancy. > Why pluralize method is automatically loaded. > > -=-Are you sure? It doesn''t work for me. Loading development environment. >> pluralize(2,''person'') NoMethodError: undefined method `pluralize'' for #<Object:0x349f4> from (irb):1 >> helper.pluralize(2,''person'') => "2 people" >> pluralize(2,''person'') NoMethodError: undefined method `pluralize'' for #<Object:0x349f4> from (irb):3 >> -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
then it must be windows issue. I killed my script/console then started another one and it still works.>> exitD:\dev\eii4>ruby script/console Loading development environment.>> pluralize(2,"person")=> "2 people">>On 7/12/07, Rob Biedenharn <Rob-GBZH0y1GwQfnZcttdmLDtcI/UQi/AW5J@public.gmane.org> wrote:> > > On Jul 12, 2007, at 4:33 PM, Neeraj Kumar wrote: > > On 7/12/07, Rob Biedenharn < Rob-GBZH0y1GwQfnZcttdmLDtcI/UQi/AW5J@public.gmane.org> wrote: > > > > > > On Jul 12, 2007, at 10:21 AM, Bob Showalter wrote: > > > On 7/12/07, Neeraj Kumar <neeraj.jsr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> I wanted to take auto_link method for a ride but in script/console > > >> I get the > > >> message that "undefined method ''tag_options''". > > >> > > >> What do I need to include in order to run auto_link("ruby on > > >> rails") on ruby > > >> script/console? > > > > > > include ActionView::Helpers::TagHelper > > > > > > or, use the little "helper" thingy, and you don''t have to worry about > > > including stuff: > > > > > >>> helper.auto_link("ruby on rails") > > > => "ruby on rails" > > > > Loading production environment. > > >> helper.auto_link("please visit http://agileconsultingllc.com for > > more information") > > => "please visit <a href=\"http://agileconsultingllc.com\ ">http:// > > agileconsultingllc.com</a> for more information" > > > > Hey thanks! That''s a fantastic tip! > > > > -Rob > > > > Rob Biedenharn http://agileconsultingllc.com > > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org > > > > > Question is if I do just > > pluralize(2,"person") in script/console without using helper or including > anything , it works by default. While auto_link("www.rubyonrails.org ") > chokes with error. Why this discrepancy. Why pluralize method is > automatically loaded. > > -=- > > > Are you sure? It doesn''t work for me. > > Loading development environment. > >> pluralize(2,''person'') > NoMethodError: undefined method `pluralize'' for #<Object:0x349f4> > from (irb):1 > >> helper.pluralize(2,''person'') > => "2 people" > >> pluralize(2,''person'') > NoMethodError: undefined method `pluralize'' for #<Object:0x349f4> > from (irb):3 > >> > > -Rob > Rob Biedenharn http://agileconsultingllc.com > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---