lib/generators/templates/component.js.jsx.coffee in react-rails-2.1.0 vs lib/generators/templates/component.js.jsx.coffee in react-rails-2.2.0
- old
+ new
@@ -1,6 +1,6 @@
-class @<%= file_name.camelize %> extends React.Component
+class @<%= component_name %> extends React.Component
<% if attributes.size > 0 -%>
@propTypes =
<% attributes.each do |attribute| -%>
<%= attribute[:name].camelize(:lower) %>: <%= attribute[:type] %>
<% end -%>
@@ -13,6 +13,6 @@
<div><%= attribute[:name].titleize %>: {this.props.<%= attribute[:name].camelize(:lower) %>}</div>
<% end -%>
</div>`
<% else -%>
`<div />`
-<% end -%>
\ No newline at end of file
+<% end -%>