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 +4 -4
- data/README.md +1 -0
- data/lib/actionscaffold/version.rb +1 -1
- data/lib/generators/scaffold_view/templates/bootstrap/_form.html.erb +21 -22
- data/lib/generators/scaffold_view/templates/bootstrap/index.html.erb +12 -16
- data/lib/generators/scaffold_view/templates/bootstrap/show.html.erb +6 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3939a3e7f5f372c0486e86d71aebd0ce9faf2abf
|
4
|
+
data.tar.gz: b6cb47a33dc467cab5ca90e32bad1ba90dedcd65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
@@ -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
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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-
|
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
|
-
|
6
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
7
7
|
<th><%= attribute.human_name %></th>
|
8
|
-
|
8
|
+
<% end -%>
|
9
9
|
<th></th>
|
10
10
|
</tr>
|
11
11
|
</thead>
|
12
12
|
<tfoot>
|
13
|
-
|
14
|
-
|
13
|
+
<tr>
|
14
|
+
</tr>
|
15
15
|
</tfoot>
|
16
16
|
<tbody>
|
17
17
|
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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 %> %> /
|
30
|
-
|
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
|
-
|
7
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
8
8
|
<dt><strong><%= attribute.human_name %>:</strong></dt>
|
9
|
-
<dd>
|
10
|
-
|
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
|
-
|
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
|
+
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-
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|