lib/generators/effective/views_generator.rb in effective_developer-0.1.1 vs lib/generators/effective/views_generator.rb in effective_developer-0.2
- old
+ new
@@ -28,10 +28,12 @@
def create_views
(invoked_actions & available_actions).each do |action|
template "views/#{action}.html.haml", resource.view_file(action)
end
- template 'views/_resource.html.haml', resource.view_file(resource.name, partial: true)
+ if invoked_actions.include?('show') || non_crud_actions.present?
+ template 'views/_resource.html.haml', resource.view_file(resource.name, partial: true)
+ end
end
private
def available_actions