actionscaffold 0.2.4.pre → 0.2.6.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9f85f9f782365fcfce49af1cb388ba2a2463f1c
4
- data.tar.gz: 22f99f07df355e81234a92b16ccf75d0ee9603b3
3
+ metadata.gz: 3939a3e7f5f372c0486e86d71aebd0ce9faf2abf
4
+ data.tar.gz: b6cb47a33dc467cab5ca90e32bad1ba90dedcd65
5
5
  SHA512:
6
- metadata.gz: 6a80579abb3c029a01e8ef3e0a0f4bf91f02370217edfb457c7e0e740b622e9a39755e3aef1deec16c3e4dc0524b2ac854a7a54149ac3fbf15bfd0a68540010f
7
- data.tar.gz: a1d6ec5cba94473a433edeb0941c5a3585f8ed02a4edbd09bc583f2e5a4d3ea45d58fdca3d6b6c9dae422c231c8726da749f4c895907a713e8ebc77504afdfa6
6
+ metadata.gz: b432be967db1b8cc00771ef2fdc3d73227b3ba2b897af467945628acbf340499e1868edcbfc7b4cf8d4fc6ef393dacd77da9eefbfce8ead3be089dd270730d47
7
+ data.tar.gz: d99b6eb520396e779bd28ade3341dff9d8357b2fc6de4ddc1c53e8328c9dc380075e034e2973f236f9174344b000761912f1216d1a2f284df9fafc7589190e07
data/README.md CHANGED
@@ -96,6 +96,7 @@ Result:
96
96
  <%= f.email_field :email, autofocus: true, class: "form-control" %>
97
97
  </div>
98
98
  ```
99
+ ![Index](http://i.imgur.com/wx3bOBE.png "Index")
99
100
  ![Errors](http://i63.tinypic.com/302b22f.png =600x "Errors")
100
101
  ![Forms](http://i66.tinypic.com/349b0og.png =600x "Forms")
101
102
 
@@ -1,3 +1,3 @@
1
1
  module ActionScaffold
2
- VERSION = '0.2.4.pre'
2
+ VERSION = '0.2.6.pre'
3
3
  end
@@ -12,39 +12,38 @@
12
12
  </aside>
13
13
  </div>
14
14
  <%% end %>
15
-
16
15
  <%%= form_for(@<%= singular_table_name %>) do |f| %>
17
16
  <article class="panel panel-default">
18
17
  <header class="panel-heading">
19
18
  <h1><%= singular_table_name.titleize %></h1>
20
19
  </header>
21
20
  <section class="panel-body">
22
- <% attributes.each do |attribute| -%>
23
- <div class="form-group">
24
- <% if attribute.password_digest? -%>
25
- <%%= f.label :password %>
26
- <%%= f.password_field :password, class: "form-control" %>
27
- </div>
28
- <div>
29
- <%%= f.label :password_confirmation %>
30
- <%%= f.password_field :password_confirmation, class: "form-control" %>
31
- <% else -%>
32
- <%- if attribute.reference? -%>
33
- <%%= f.label :<%= attribute.column_name %> %>
34
- <%%= f.collection_select :<%= attribute.column_name %>, <%= attribute.name.camelize %>.all, :id, :name, prompt: true %>
35
- <%- else -%>
36
- <%%= f.label :<%= attribute.name %> %>
37
- <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, class: "form-control" %>
38
- <%- end -%>
39
- <% end -%>
40
- </div>
41
- <% end -%>
21
+ <%- attributes.each do |attribute| -%>
22
+ <div class="form-group">
23
+ <%- if attribute.password_digest? -%>
24
+ <%%= f.label :password %>
25
+ <%%= f.password_field :password, class: "form-control" %>
26
+ </div>
27
+ <div>
28
+ <%%= f.label :password_confirmation %>
29
+ <%%= f.password_field :password_confirmation, class: "form-control" %>
30
+ <%- else -%>
31
+ <%- if attribute.reference? -%>
32
+ <%%= f.label :<%= attribute.column_name %> %>
33
+ <%%= f.collection_select :<%= attribute.column_name %>, <%= attribute.name.camelize %>.all, :id, :name, prompt: true %>
34
+ <%- else -%>
35
+ <%%= f.label :<%= attribute.name %> %>
36
+ <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, class: "form-control" %>
37
+ <%- end -%>
38
+ <%- end -%>
39
+ </div>
40
+ <%- end -%>
42
41
  </section>
43
42
  <footer class="panel-footer">
44
43
  </footer>
45
44
  </article>
46
45
 
47
46
  <div class="form-group actions">
48
- <%%= f.submit :Submit, class: "btn btn-primary" %>
47
+ <%%= f.submit :Submit, class: "btn btn-default" %>
49
48
  </div>
50
49
  <%% end %>
@@ -3,31 +3,27 @@
3
3
  <table class="table table-striped">
4
4
  <thead>
5
5
  <tr>
6
- <% attributes.reject(&:password_digest?).each do |attribute| -%>
6
+ <% attributes.reject(&:password_digest?).each do |attribute| -%>
7
7
  <th><%= attribute.human_name %></th>
8
- <% end -%>
8
+ <% end -%>
9
9
  <th></th>
10
10
  </tr>
11
11
  </thead>
12
12
  <tfoot>
13
- <tr>
14
- </tr>
13
+ <tr>
14
+ </tr>
15
15
  </tfoot>
16
16
  <tbody>
17
17
  <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
18
- <tr><% attributes.reject(&:password_digest?).each do |attribute| %>
19
- <td><% if attribute.reference? -%>
20
- <%%= <%= singular_table_name %>.<%= attribute.name %>.name %>
21
- <% elsif attribute.type == :boolean %>
22
- <%%= check_box_tag "<%= singular_table_name %>",
23
- <%= singular_table_name %>.<%= attribute.name %>, <%= singular_table_name %>.<%= attribute.name %> %>
24
- <% else %>
25
- <%%= <%= singular_table_name %>.<%= attribute.name %> %>
26
- <% end %></td>
27
- <% end %>
18
+ <tr>
19
+ <% attributes.reject(&:password_digest?).each do |attribute| -%>
20
+ <td><%- if attribute.reference? %><%%= <%= singular_table_name %>.<%= attribute.name %>.name %>
21
+ <% elsif attribute.type == :boolean -%><%%= check_box_tag "<%= singular_table_name %>", <%= singular_table_name %>.<%= attribute.name %>, <%= singular_table_name %>.<%= attribute.name %> %><% else %><%%= <%= singular_table_name %>.<%= attribute.name %> %><% end -%></td>
22
+ <% end -%>
28
23
  <td>
29
- <%%= link_to 'Show', <%= singular_table_name %> %> / <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %> / <%%= link_to 'Delete', <%= singular_table_name %>,
30
- method: :delete, data: { confirm: 'Are you sure?' } %>
24
+ <%%= link_to 'Show', <%= singular_table_name %> %> /
25
+ <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %> /
26
+ <%%= link_to 'Delete', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %>
31
27
  </td>
32
28
  </tr>
33
29
  <%% end %>
@@ -4,22 +4,15 @@
4
4
  </header>
5
5
  <section class="panel-body">
6
6
  <dl class="dl-horizontal">
7
- <% attributes.reject(&:password_digest?).each do |attribute| -%>
7
+ <% attributes.reject(&:password_digest?).each do |attribute| -%>
8
8
  <dt><strong><%= attribute.human_name %>:</strong></dt>
9
- <dd>
10
- <% if attribute.reference? -%>
11
- <%%= @<%= singular_table_name %>.<%= attribute.name %>.name %>
12
- <% elsif attribute.type == :boolean %>
13
- <%%= check_box_tag "<%= singular_table_name %>", @<%= singular_table_name %>.<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %> %>
14
- <% else %>
15
- <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
16
- <% end -%>
17
- </dd>
18
- <% end %>
9
+ <dd><%- if attribute.reference? -%><%%= @<%= singular_table_name %>.<%= attribute.name %>.name %><%- elsif attribute.type == :boolean -%><%%= check_box_tag "<%= singular_table_name %>", @<%= singular_table_name %>.<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %> %><% else -%><%%= @<%= singular_table_name %>.<%= attribute.name %> %><%- end -%></dd>
10
+ <% end -%>
19
11
  </dl>
20
12
  </section>
21
13
  <footer class="panel-footer">
14
+ <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %> |
15
+ <%%= link_to 'Back', <%= index_helper %>_path %>
22
16
  </footer>
23
17
  </article>
24
- <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %> |
25
- <%%= link_to 'Back', <%= index_helper %>_path %>
18
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionscaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4.pre
4
+ version: 0.2.6.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marko Tunjic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-31 00:00:00.000000000 Z
11
+ date: 2016-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails