lib/generators/phlex/view/templates/view.rb.erb in phlex-0.4.0 vs lib/generators/phlex/view/templates/view.rb.erb in phlex-0.5.0
- old
+ new
@@ -1,8 +1,14 @@
<% module_namespacing do -%>
module Views
- class <%= class_name %> < ApplicationView
+ class <%= class_name %> < Phlex::HTML
+ include ApplicationView
+
def template
+ <%= "# " unless @layout %>render Layout.new(title: "<%= class_name.gsub("::", " ").titlecase %>") do
+ h1 { "<%= class_name %>" }
+ p { "Find me in <%= @path %>" }
+ <%= "# " unless @layout %>end
end
end
end
<% end %>