zirni/controller_concerned
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Organize your controller and place each action/functionality in a separate file.
Especially if your controller actions are too big you can use controller_concerned.
I know, the better way is to refactor your controller code to avoid masses of lines,
but if you haven't enough time for refactoring, try this.
class UsersController < ApplicationController
concerned_with :searching
end
concerned_with will require files at controller/users/
Just add a file to controller/users/ and thats it.
name: searching.rb
class UsersController
def search
end
end