I personally use ResourceController,
http://github.com/jamesgolick/resource_controller,  for controllers
using the REST-pattern, but
http://github.com/josevalim/inherited_resources seems very nice too.

/K

2010/1/25 Alpha Blue <li...@ruby-forum.com>:
> You probably should extend your code by creating a module that deals
> with many of the conditions you are trying to handle. Then all you have
> to do is include the module in the controllers that require the methods.
>
> module Foo
>
>  def self.method_one
>  end
>
>  def Foo.method_two
>  end
>
>  class << self
>    def method_three
>    end
>  end
>
> end
>
> You can do it a number of ways as my example shows.  The module goes in
> your lib folder.  You include it by doing:
>
> class YourController < ActionController::Base
>  include Foo
>
>  def create
>    ..
>  end
>
> end
>
>
>
>
> --
> 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-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.
>
>

-- 
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