On 14 April 2010 15:18, Chris Habgood <chabg...@gmail.com> wrote:

> ok as far as controllers are concerned in a RoR app would either of those
> style matter as far as name spacing?
>

Nope, won't matter a jot.

But if you have this:

class Admin::FooController

end

without declaring Admin first you'll get an error.

What I tend to do is this:

module Admin
  class BaseController
    def some_admin_method
      ...
    end
  end
end

Because you need to declare Admin before you can just randomly start using
it.  Then I do this when declaring a subclass:

class PagesController < Admin::BaseController
  ...
end

Cheers,


Andy

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to