lib/generators/scrivito/page/page_generator.rb in scrivito_sdk-1.1.1 vs lib/generators/scrivito/page/page_generator.rb in scrivito_sdk-1.2.0.rc1
- old
+ new
@@ -17,8 +17,16 @@
def create_views
copy_file 'index.html.erb', "app/views/#{file_name}/index.html.erb"
copy_file 'details.html.erb', "app/views/#{file_name}/details.html.erb"
template 'thumbnail.html.erb', "app/views/#{file_name}/thumbnail.html.erb"
end
+
+ def file_name
+ super.ends_with?('page') ? super : "#{super}_page"
+ end
+
+ def class_name
+ super.ends_with?('page') || super.ends_with?('Page') ? super : "#{super}Page"
+ end
end
end
end