Skip to content

zirni/controller_concerned

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Organize your controller and place each action/functionality in a separate file

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages