Sha256: 1089cab063e619285504cab7dacb5284ba30240a211d881f7ac13c7bd72e762d
Contents?: true
Size: 649 Bytes
Versions: 54
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true require_dependency "scenic" # Override Scenic's definition#full_path so it will resolve db/views as whatever is in # config.paths["db/views"] 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). module ResolveSceneicViewsInEngineOnly 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 end Scenic::Definition.prepend(ResolveSceneicViewsInEngineOnly)
Version data entries
54 entries across 54 versions & 1 rubygems