You must not do this. Are you creating a model? Then using two class methods on the model would be much better. It also greatly improves the code. Then you can use the methods not only in the controllers, but also in the background (etc.) in the future.
For example, if you create Person:
class VerboseController < ApplicationController def create Person.verbose_create(params) end end class SimpleController < ApplicationController def create Person.simple_create(params) end end
Then in the Person model you can do the following:
class Person def self.verbose_create(options)
Hope this helps a little. :-)
source share