nu-generators 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,7 +40,7 @@ class <%= class_name.pluralize %>Controller < ApplicationController
40
40
  format.html { redirect_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) }
41
41
  format.json { render json: @<%= singular_table_name %>, status: :created, location: @<%= singular_table_name %> }
42
42
  else
43
- format.html { render action: "new" }
43
+ format.html { render "new" }
44
44
  format.json { render json: @<%= singular_table_name %>.errors, status: :unprocessable_entity }
45
45
  end
46
46
  end
@@ -54,7 +54,7 @@ class <%= class_name.pluralize %>Controller < ApplicationController
54
54
  format.html { redirect_to all_<%= plural_table_name %>_path }
55
55
  format.json { head :ok }
56
56
  else
57
- format.html { render action: "edit" }
57
+ format.html { render "edit" }
58
58
  format.json { render json: @<%= singular_table_name %>.errors, status: :unprocessable_entity }
59
59
  end
60
60
  end
@@ -1,5 +1,5 @@
1
- <%%= form_for(@<%= singular_table_name %>) do |f| %>
2
- <%%#= render 'form_messages', object: @<%= singular_table_name %> %>
1
+ <%%= form_for(<%= singular_table_name %>) do |f| %>
2
+ <%%#= render 'form_messages', object: <%= singular_table_name %> %>
3
3
 
4
4
  <div class="field-group">
5
5
  <%- attributes.each do |attribute| -%>
@@ -16,12 +16,12 @@
16
16
  <%%= link_to "cancel", :back, <%= key_value :class, "'btn'" %> %>
17
17
  </div>
18
18
 
19
- <%%#= render 'status', object: @<%= singular_table_name %>, f: f %>
19
+ <%%#= render 'status', object: <%= singular_table_name %>, f: f %>
20
20
 
21
- <%%- unless @<%= singular_table_name %>.new_record? -%>
21
+ <%%- unless <%= singular_table_name %>.new_record? -%>
22
22
  <div class="field-group">
23
- <%%= link_to "visualize", @<%= singular_table_name %>, <%= key_value :class, "'btn'" %> %>
24
- <%%= link_to "remove", @<%= singular_table_name %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ confirm: 'Are you sure?' }" %>, <%= key_value :class, "'btn btn-danger'" %> %>
23
+ <%%= link_to "visualize", <%= singular_table_name %>, <%= key_value :class, "'btn'" %> %>
24
+ <%%= link_to "remove", <%= singular_table_name %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ confirm: 'Are you sure?' }" %>, <%= key_value :class, "'btn btn-danger'" %> %>
25
25
  </div>
26
26
  <%%- end -%>
27
27
  </div>
@@ -1,5 +1,5 @@
1
1
  <div class="publisher">
2
2
  <h1>editing <%= singular_table_name %></h1>
3
3
 
4
- <%%= render 'form' %>
4
+ <%%= render 'form', <%= singular_table_name %>: @<%= singular_table_name %> %> %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  <div class="publisher">
2
2
  <h1>new <%= singular_table_name %></h1>
3
3
 
4
- <%%= render 'form' %>
4
+ <%%= render 'form', <%= singular_table_name %>: @<%= singular_table_name %> %>
5
5
  </div>
@@ -1,5 +1,5 @@
1
1
  module Nu
2
2
  module Generators
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nu-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-11-12 00:00:00.000000000 Z
14
+ date: 2012-11-27 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: nu design custom generators
17
17
  email: