Hexa's Blog

Rails, configuring view path of controller

22/12/2015 Rails

This is a solution to configure the view path of any controller in Rails web framework. The only method you have to concern is self.controller_path

class User::HomeController < ApplicationController
  def self.controller_path
    "users/home"
  end
end

With this configuration, all view of User::HomeController will be located in app/users/home/