el_generators 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module ElGenerators
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  <h1>Listing <%= plural_table_name %></h1>
2
-
2
+ <p id="notice"><%%= notice %></p>
3
3
  <table>
4
4
  <tr>
5
5
  <% attributes.each do |attribute| -%>
@@ -17,7 +17,7 @@
17
17
  <% end -%>
18
18
  <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
19
19
  <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
20
- <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :confirm, "'Are you sure?'" %>, <%= key_value :method, ":delete" %> %></td>
20
+ <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :confirm, " confirm_message_on_destroy(#{ singular_table_name }) " %>, <%= key_value :method, ":delete" %> %></td>
21
21
  </tr>
22
22
  <%% end %>
23
23
  </table>
@@ -45,7 +45,7 @@ class <%= controller_class_name %>Controller < ApplicationController
45
45
 
46
46
  respond_to do |format|
47
47
  if @<%= orm_instance.save %>
48
- format.html { redirect_to @<%= singular_table_name %>, <%= key_value :notice, "'#{human_name} was successfully created.'" %> }
48
+ format.html { redirect_to <%= index_helper %>_url , <%= key_value :notice, "message_on_create(@#{singular_table_name})" %> }
49
49
  format.json { render <%= key_value :json, "@#{singular_table_name}" %>, <%= key_value :status, ':created' %>, <%= key_value :location, "@#{singular_table_name}" %> }
50
50
  else
51
51
  format.html { render <%= key_value :action, '"new"' %> }
@@ -61,7 +61,8 @@ class <%= controller_class_name %>Controller < ApplicationController
61
61
 
62
62
  respond_to do |format|
63
63
  if @<%= orm_instance.update_attributes("params[:#{singular_table_name}]") %>
64
- format.html { redirect_to @<%= singular_table_name %>, <%= key_value :notice, "'#{human_name} was successfully updated.'" %> }
64
+ format.html { redirect_to <%= index_helper %>_url , <%= key_value :notice, "message_on_update(@#{singular_table_name})" %> }
65
+
65
66
  format.json { head :no_content }
66
67
  else
67
68
  format.html { render <%= key_value :action, '"edit"' %> }
@@ -77,7 +78,7 @@ class <%= controller_class_name %>Controller < ApplicationController
77
78
  @<%= orm_instance.destroy %>
78
79
 
79
80
  respond_to do |format|
80
- format.html { redirect_to <%= index_helper %>_url }
81
+ format.html { redirect_to <%= index_helper %>_url , <%= key_value :notice, "message_on_destroy(@#{singular_table_name})" %> }
81
82
  format.json { head :no_content }
82
83
  end
83
84
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: el_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-10 00:00:00.000000000 Z
12
+ date: 2012-05-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Basic generators for standard Rails applications
15
15
  email: