lib/generators/effective/views_generator.rb in effective_developer-0.6.14 vs lib/generators/effective/views_generator.rb in effective_developer-0.6.15
- old
+ new
@@ -29,11 +29,20 @@
say_status :invoke, :views, :white
end
def create_views
if invoked_actions.include?('show') || non_crud_actions.present?
- template 'views/_resource.html.haml', resource.view_file(resource.name, partial: true)
+ if admin_effective_scaffold?
+ template "#{scaffold_path}/views/_resource.html.haml", resource.admin_effective_view_file(resource.name, partial: true)
+ else
+ template "#{scaffold_path}/views/_resource.html.haml", resource.view_file(resource.name, partial: true)
+ end
end
+
+ if effective_scaffold?
+ template "#{scaffold_path}/views/_layout.html.haml", resource.view_file('layout', partial: true)
+ end
+
end
end
end
end