I notice that when I run rake doc:app, that the named_scope declarations I have in my models aren''t being included in the documentation. Is there a way to get named_scopes in the rdocs? Thanks, Will -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Even IDE s have problem with named_scopes. I don''t think RDoc can recognize it. Besides looking like a train wreck, that''s one of the reason I don''t like named_scopes. On Wed, Jul 21, 2010 at 7:23 AM, Will Clark <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I notice that when I run rake doc:app, that the named_scope declarations > I have in my models aren''t being included in the documentation. > > Is there a way to get named_scopes in the rdocs? > > Thanks, > Will > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Cheers, Bala RoR Developer Now Available for Hire -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Bala Paranj wrote:> Even IDE s have problem with named_scopes.Who cares about IDEs? :) No IDE that I''m aware of really works well with Ruby''s dynamic features. IMHO, that''s a reason to not use an IDE for Ruby.> I don''t think RDoc can > recognize > it.I think you''re right, but it wouldn''t be hard to patch RDoc to recognize it if you want to.> Besides looking like a train wreck, that''s one of the reason I don''t > like named_scopes.Those are bad reasons to dislike named_scope, frankly. I don''t think the syntax is at all bad, and using a named_scope makes most of the rest of your code *not* look like a trainwreck. I''ll take a named_scope over the old way of doing it any day. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, Jul 21, 2010 at 1:21 PM, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I think you''re right, but it wouldn''t be hard to patch RDoc to recognize > it if you want to.Code, as opposed to unsubstantiated assertions, would be much more credible. Bill -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
For anyone interested, I emailed Eric Hodel who mentioned that it is possible: == You''ll need ## above your comment like: # This is the test model class Test < ActiveRecord::Base ## # Sort all tests by name named_scope :sort_by_name, :order => "name ASC" end See ''Metaprogrammed Methods'' here: http://rdoc.rubyforge.org/RDoc/Parser/Ruby.html == -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Bill Walton wrote:> On Wed, Jul 21, 2010 at 1:21 PM, Marnen Laibow-Koser > <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> I think you''re right, but it wouldn''t be hard to patch RDoc to recognize >> it if you want to. > > Code, as opposed to unsubstantiated assertions, would be much more > credible.The OP''s problem isn''t mine, so I''m not going to spend the time writing that code. I was just trying to remind him that it''s feasible if he wants to do it. No more, no less. In any case, it seems that a patch isn''t necessary, based on the feature mentioned in http://www.ruby-forum.com/topic/213558#927241 . I''m happy to know about that feature, and I will probably use it a great deal.> > BillBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.