I tried to make a partial but it threw this: http://rafb.net/paste/results/rZAFTV34.html I thought it was weird since this wasnt a very complicated case so I made it simpler. Now I have a partial empty rhtml and calling it with "render :partial => "shared/list"" but it still gives me the same error. How can I beat this? I''m really stuck at this now. -- 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 -~----------~----~----~----~------~----~------~--~---
dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org
2006-Sep-25 13:31 UTC
Re: Partials not working
Hi -- On Mon, 25 Sep 2006, RoR newbie wrote:> > I tried to make a partial but it threw this: > http://rafb.net/paste/results/rZAFTV34.html > > I thought it was weird since this wasnt a very complicated case so I > made it simpler. Now I have a partial empty rhtml and calling it with > "render :partial => "shared/list"" but it still gives me the same error. > > How can I beat this? I''m really stuck at this now.You''re going through one of the nuby (Ruby newbie) rites of passage :-) Don''t use ''class'' as a local variable or method name. Ruby sees it and thinks you mean the keyword ''class''. David -- David A. Black | dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB''s Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.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 -~----------~----~----~----~------~----~------~--~---
unknown wrote:> Hi -- > > On Mon, 25 Sep 2006, RoR newbie wrote: > >> >> I tried to make a partial but it threw this: >> http://rafb.net/paste/results/rZAFTV34.html >> >> I thought it was weird since this wasnt a very complicated case so I >> made it simpler. Now I have a partial empty rhtml and calling it with >> "render :partial => "shared/list"" but it still gives me the same error. >> >> How can I beat this? I''m really stuck at this now. > > You''re going through one of the nuby (Ruby newbie) rites of passage > :-) > > Don''t use ''class'' as a local variable or method name. Ruby sees it > and thinks you mean the keyword ''class''. > > > David > > -- > David A. Black | dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org > Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] > DABlog (DAB''s Weblog) [2] | Co-director, Ruby Central, Inc. [4] > [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com > [2] http://dablog.rubypal.com | [4] http://www.rubycentral.orgYeah, I first thought about that too and I did have :locals { :class => something } but as I said I made it a lot simpler, as simple as it can be I think. Currently the shared/_link.rhtml is "<p>text</p>". -- 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 -~----------~----~----~----~------~----~------~--~---
dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org
2006-Sep-25 13:54 UTC
Re: Partials not working
Hi -- On Mon, 25 Sep 2006, RoR newbie wrote:> > unknown wrote: >> Hi -- >> >> On Mon, 25 Sep 2006, RoR newbie wrote: >> >>> >>> I tried to make a partial but it threw this: >>> http://rafb.net/paste/results/rZAFTV34.html >>> >> >> Don''t use ''class'' as a local variable or method name. Ruby sees it >> and thinks you mean the keyword ''class''. >> > Yeah, I first thought about that too and I did have :locals { :class => > something } but as I said I made it a lot simpler, as simple as it can > be I think. Currently the shared/_link.rhtml is "<p>text</p>".If you''re still getting the same error message then it''s still picking up class as a local from somewhere. Usually that''s a sign of either caching or else accidentally editing the file in the wrong directory. (It really does happen! :-) David -- David A. Black | dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB''s Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.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 -~----------~----~----~----~------~----~------~--~---
unknown wrote:> Hi -- > > On Mon, 25 Sep 2006, RoR newbie wrote: > >>> >>> Don''t use ''class'' as a local variable or method name. Ruby sees it >>> and thinks you mean the keyword ''class''. >>> >> Yeah, I first thought about that too and I did have :locals { :class => >> something } but as I said I made it a lot simpler, as simple as it can >> be I think. Currently the shared/_link.rhtml is "<p>text</p>". > > If you''re still getting the same error message then it''s still picking > up class as a local from somewhere. Usually that''s a sign of either > caching or else accidentally editing the file in the wrong directory. > (It really does happen! :-) > > > David > > -- > David A. Black | dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org > Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] > DABlog (DAB''s Weblog) [2] | Co-director, Ruby Central, Inc. [4] > [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com > [2] http://dablog.rubypal.com | [4] http://www.rubycentral.orgAh, it must''ve been caching or something because I restarted the web server and it worked. Thanks. -- 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 -~----------~----~----~----~------~----~------~--~---