Module: ResolveSceneicViewsInEngineOnly
- Defined in:
- lib/core_extensions/scenic.rb
Overview
Override Scenic’s definition#full_path so it will resolve db/views as whatever is in config.paths if present, otherwise default to the original implementation. Note his does not support having or merging views in both engine and the host app (as yet).
Instance Method Summary collapse
Instance Method Details
#full_path ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/core_extensions/scenic.rb', line 9 def full_path app = Rails.application if defined?(app) && app && app.config.paths["db/views"].present? File.join(app.config.paths["db/views"].to_a.first, filename) else super end end |