I have a ColumnSort
module in my rails project.
module ColumnSort
extend ActiveSupport::Concern
def sort_column
# do something
end
end
And I'm using it from CompaniesController
and UsersController
.
class CompaniesController < ApplicationController
include ColumnSort
helper_method :sort_column
end
class UsersController < ApplicationController
include ColumnSort
helper_method :sort_column
end
It works fine. But I want to write the line helper_method :sort_column
in the module ColumnSort
. How can I write it?