lib/pagelet_rails/concerns/controller.rb in pagelet_rails-0.1.1 vs lib/pagelet_rails/concerns/controller.rb in pagelet_rails-0.1.2
- old
+ new
@@ -14,26 +14,27 @@
layout :layout_name
helper_method :pagelet_request?
- pagelet_options layout: 'panel'
+ pagelet_options layout: 'container'
end
def layout_name
layout = params[:layout] || pagelet_options.layout
- "pagelets/#{layout}"
+ "pagelet_rails/#{layout}"
end
def pagelet_request?
request.headers['X-Pagelet'].present? || params[:target_container]
end
private
def append_pagelet_view_paths
self.view_paths.unshift 'app/pagelets/'
+ self.view_paths.unshift 'test/dummy/app/pagelets/' if Rails.env.test?
# lookup_context.prefixes.clear
view = "#{controller_name}/views"
if lookup_context.prefixes.exclude?(view)
lookup_context.prefixes.unshift "#{controller_name}/views"