starter_generators 0.5.0 → 0.5.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1f6e9d66d31d260cda9efc035ef7646111a8c01
4
- data.tar.gz: ebedb00b4c4ce97ac4a9a79f40586adea41cf72c
3
+ metadata.gz: 4e7e3cc8a55a31819442bb27a35aff456b56c448
4
+ data.tar.gz: feee147493243aca31a44b028d4dddfd8831c6f5
5
5
  SHA512:
6
- metadata.gz: 7bdec829493090befefb5ff29230d5645b581f25f2c57e33ddb0dd9a4994f5ef24d1d4e426d4159ea745fba116e416aee8e976c4c9cdad0ab96168ffeb4e5fa3
7
- data.tar.gz: 443fe00afc6ec8146fccbce64c0aa55e7a0cb940a180e0527c3f7fe1eaffa581cf06e86ffc44a60a002db78339ef73c1684bc1afd667bf0b4e991101535d26c3
6
+ metadata.gz: acd1682e3423b62bdd1468475038d81cfd54095ff41bed39db8f1c7cc3dc74f246fa5ba688c62f1e2f4b66b6e3e7e402ad30f1d9eef87bc57dd3e5f897ec0825
7
+ data.tar.gz: edcfc78b829e15cb7fd954a4a0da24cb1db86b6fda1f599785b63d0ee43e233e50e4b2edf36b5a191e4f56f4f5871f2f57b835a0228da35786c21edff585d57f
@@ -18,7 +18,11 @@ class <%= plural_name.camelize %>Controller < ApplicationController
18
18
  @<%= singular_name.underscore %>.<%= attribute.name %> = params[:<%= attribute.name %>]
19
19
  <% end %>
20
20
  if @<%= singular_name.underscore %>.save
21
+ <% if named_routes? -%>
22
+ redirect_to <%= plural_name %>_url
23
+ <% else -%>
21
24
  redirect_to "/<%= plural_name %>"
25
+ <% end -%>
22
26
  else
23
27
  render 'new'
24
28
  end
@@ -34,7 +38,11 @@ class <%= plural_name.camelize %>Controller < ApplicationController
34
38
  @<%= singular_name.underscore %>.<%= attribute.name %> = params[:<%= attribute.name %>]
35
39
  <% end %>
36
40
  if @<%= singular_name.underscore %>.save
41
+ <% if named_routes? -%>
42
+ redirect_to <%= plural_name %>_url
43
+ <% else -%>
37
44
  redirect_to "/<%= plural_name %>"
45
+ <% end -%>
38
46
  else
39
47
  render 'edit'
40
48
  end
@@ -43,6 +51,10 @@ class <%= plural_name.camelize %>Controller < ApplicationController
43
51
  def destroy
44
52
  @<%= singular_name.underscore %> = <%= class_name %>.find_by_id(params[:id])
45
53
  @<%= singular_name.underscore %>.destroy
54
+ <% if named_routes? -%>
55
+ redirect_to <%= plural_name %>_url
56
+ <% else -%>
46
57
  redirect_to "/<%= plural_name %>"
58
+ <% end -%>
47
59
  end
48
60
  end
@@ -22,7 +22,7 @@
22
22
  <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
23
23
  <tr>
24
24
  <% attributes.each do |attribute| -%>
25
- <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
25
+ <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
26
26
  <% end -%>
27
27
  <% if named_routes? %>
28
28
  <td><%%= link_to 'Show', <%= singular_table_name %>_url(<%= singular_table_name %>) %></td>
@@ -22,10 +22,10 @@
22
22
  */
23
23
  @font-face {
24
24
  font-family: 'FontAwesome';
25
- src: url('<%= asset_path('font/fontawesome-webfont.eot') %>');
26
- src: url('<%= asset_path('font/fontawesome-webfont.eot?#iefix') %>') format('embedded-opentype'),
27
- url('<%= asset_path('font/fontawesome-webfont.woff') %>') format('woff'),
28
- url('<%= asset_path('font/fontawesome-webfont.ttf') %>') format('truetype');
25
+ src: url('<%%= asset_path('font/fontawesome-webfont.eot') %>');
26
+ src: url('<%%= asset_path('font/fontawesome-webfont.eot?#iefix') %>') format('embedded-opentype'),
27
+ url('<%%= asset_path('font/fontawesome-webfont.woff') %>') format('woff'),
28
+ url('<%%= asset_path('font/fontawesome-webfont.ttf') %>') format('truetype');
29
29
  font-weight: normal;
30
30
  font-style: normal;
31
31
  }
@@ -22,7 +22,7 @@
22
22
  <div class="nav-collapse">
23
23
  <ul class="nav">
24
24
  <% if options[:navbar] %>
25
- <li class="active"><%%= link_to "Home", "/" %></li>
25
+ <li><%%= link_to "Home", "/" %></li>
26
26
  <% app_tables.each do |table_name| -%>
27
27
  <li><%%= link_to "<%= table_name.humanize.titleize %>", "/<%= table_name %>" %></li>
28
28
  <% end -%>
@@ -39,7 +39,7 @@
39
39
  <%% if flash[:notice] %>
40
40
  <div class="alert alert-success">
41
41
  <button type="button" class="close" data-dismiss="alert">&times;</button>
42
- <strong>Notice</strong><%%= notice %>
42
+ <%%= notice %>
43
43
  </div>
44
44
  <%% end %>
45
45
 
@@ -1,3 +1,3 @@
1
1
  module StarterGenerators
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starter_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Cohen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-27 00:00:00.000000000 Z
11
+ date: 2013-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler