Sha256: 17f2f2301ee2ae2f40c4fa66b2a62d2f6ba001d3d3a8daf4a747d42672cfbf7a
Contents?: true
Size: 689 Bytes
Versions: 1
Compression:
Stored size: 689 Bytes
Contents
module ResourceController module Views private # Use dynamic scaffold fallback if a template can't be found in the view paths. def default_template(action_name = self.action_name) view_paths.find_template(default_template_name(action_name), default_template_format) rescue ActionView::MissingTemplate raise if controller.resource_controller_options[:scaffold_root].blank? action_name = "index" if action_name.blank? scaffold_paths = view_paths.class.new scaffold_paths.unshift(controller.resource_controller_options[:scaffold_root]) scaffold_paths.find_template(action_name, default_template_format) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
resource_controller_views-0.6.6.views2 | lib/resource_controller/views.rb |