Rodrigo Rosenfeld Rosas
2012-Apr-07 14:28 UTC
Is require_dependency supposed to be a public API?
If so, shouldn''t it be documented in the Rails API? Or is there a better way to allow class reloading of my files under lib. I mean, I know about config.autoload_paths, but I want to be explicit about my requires. I just want to be able to reload then on each request when I''m working on them. require_dependency seems to do just that but I''m worried since it is not mentioned in the official public API. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
require_dependency is designed to be used for the purposes you describe. A lot of things aren''t documented in the Rails API that are public. Doesn''t mean that you shouldn''t use them. On Saturday, 7 April 2012 at 9:28 AM, Rodrigo Rosenfeld Rosas wrote:> If so, shouldn''t it be documented in the Rails API? > > Or is there a better way to allow class reloading of my files under lib. > I mean, I know about config.autoload_paths, but I want to be explicit > about my requires. I just want to be able to reload then on each request > when I''m working on them. > > require_dependency seems to do just that but I''m worried since it is not > mentioned in the official public API. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com (mailto:rubyonrails-core@googlegroups.com). > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com (mailto:rubyonrails-core+unsubscribe@googlegroups.com). > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
I can''t see require_dependency being removed without a deprecation so I''d say go ahead. And feel free to submit a doc patch... On 07/04/12 15:49, Ryan Bigg wrote:> require_dependency is designed to be used for the purposes you describe. > > A lot of things aren''t documented in the Rails API that are public. > Doesn''t mean that you shouldn''t use them. > > On Saturday, 7 April 2012 at 9:28 AM, Rodrigo Rosenfeld Rosas wrote: > >> If so, shouldn''t it be documented in the Rails API? >> >> Or is there a better way to allow class reloading of my files under lib. >> I mean, I know about config.autoload_paths, but I want to be explicit >> about my requires. I just want to be able to reload then on each request >> when I''m working on them. >> >> require_dependency seems to do just that but I''m worried since it is not >> mentioned in the official public API. >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com >> <mailto:rubyonrails-core@googlegroups.com>. >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com >> <mailto:rubyonrails-core+unsubscribe@googlegroups.com>. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. > > -- > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en.-- http://jonathanleighton.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Rodrigo Rosenfeld Rosas
2012-Apr-07 15:24 UTC
Re: Is require_dependency supposed to be a public API?
Em 07-04-2012 12:03, Jon Leighton escreveu:> I can''t see require_dependency being removed without a deprecation so > I''d say go ahead. > > And feel free to submit a doc patch...The entire file is marked as :nodoc: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/dependencies.rb#L218 There must be a reason for that and I''d need to understand the reason first before providing a doc patch. Is it possible to override the :nodoc: instruction for some particular method? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.