-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
THis moves the camelization of singular_table_name and plural_table_name calls to its own method.
- Loading branch information
Showing
9 changed files
with
42 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
superglue_rails/lib/generators/superglue/view_collection/templates/props/index.json.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
json.<%= plural_table_name.camelize(:lower) %> do | ||
json.<%= js_plural_table_name %> do | ||
json.array! @<%= plural_table_name %> do |<%= singular_table_name %>| | ||
<%- attributes_list_with_timestamps.each do |attr| -%> | ||
json.<%=attr%> <%= singular_table_name.camelize(:lower) %>.<%=attr%> | ||
json.<%=attr%> <%= js_singular_table_name %>.<%=attr%> | ||
<%- end -%> | ||
json.edit<%=singular_table_name.camelize%>Path edit_<%=singular_table_name%>_path(<%=singular_table_name%>) | ||
json.<%=singular_table_name.camelize(:lower)%>Path <%=singular_table_name%>_path(<%=singular_table_name%>) | ||
json.edit<%=js_singular_table_name(:upper)%>Path edit_<%=singular_table_name%>_path(<%=singular_table_name%>) | ||
json.<%=js_singular_table_name%>Path <%=singular_table_name%>_path(<%=singular_table_name%>) | ||
json.deleteForm do | ||
form_props(model: <%=singular_table_name%>, method: :delete) | ||
end | ||
end | ||
end | ||
|
||
json.new<%= singular_table_name.camelize %>Path new_<%= singular_table_name %>_path | ||
json.new<%= js_singular_table_name(:upper) %>Path new_<%= singular_table_name %>_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters