[ rails ] prepend_view_paths

class ApplicationController < ActionController::Base
before_filter :prepend_view_paths

def prepend_view_paths
prepend_view_path "app/views/#{current_app_code}"
end

end

or prepend_action is also OK. ( https://dsin.wordpress.com/2017/02/24/rails-actioncontroller-before_action-and-before_filter/ )

ref : http://stackoverflow.com/questions/6055319/how-can-i-intercept-railss-template-rendering

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s