silmarails 0.2.0 → 0.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d802925619b1379cb728fca93372249f7bfa64d
|
4
|
+
data.tar.gz: 3f2c33a7ed323f7fb386455c84fb728824a85490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 138b7dd743acbecdae6ac235aac4e0d51a6f938d570b8c559cdbe948393ecbe4ffec9162ca4f2974be8ddfc6c0202e1edf494393510997dc2a0f497e3173db28
|
7
|
+
data.tar.gz: a568e793316d931121295cf5aa089401fc526076244ba998c400ae3b6730665a6f9e2fd30aff38a661bc62e272766d90905df743654f3a2b4671e3da42b498f5
|
data/README.md
CHANGED
@@ -26,6 +26,8 @@ gem 'silmarails'
|
|
26
26
|
gem 'kaminari'
|
27
27
|
gem 'responders'
|
28
28
|
gem 'simple_form'
|
29
|
+
# Uncomment this and remove bootstrap if you are using foundation
|
30
|
+
# gem 'foundation-rails'
|
29
31
|
|
30
32
|
group :test do
|
31
33
|
gem "rspec"
|
@@ -53,16 +55,27 @@ list of commands you'll probably need to execute:
|
|
53
55
|
|
54
56
|
```bash
|
55
57
|
rails g kaminari:config
|
56
|
-
rails g
|
58
|
+
rails g rspec:install
|
57
59
|
rails g responders:install
|
60
|
+
|
61
|
+
# if you're using bootstrap
|
62
|
+
rails g kaminari:views bootstrap3
|
58
63
|
rails g simple_form:install --bootstrap
|
59
|
-
|
64
|
+
|
65
|
+
# if you're using foundation
|
66
|
+
rails g foundation:install
|
67
|
+
rails g kaminari:views foundation5
|
68
|
+
rails g simple_form:install --foundation
|
60
69
|
```
|
61
70
|
|
62
71
|
And finally:
|
63
72
|
|
64
73
|
```bash
|
65
|
-
|
74
|
+
# if you're using bootstrap
|
75
|
+
rails g silmarails:install --framework=bootstrap
|
76
|
+
|
77
|
+
# if you're using foundation
|
78
|
+
rails g silmarails:install --framework=foundation
|
66
79
|
```
|
67
80
|
|
68
81
|
This will copy all the default templates into your rails project, and may have
|
@@ -100,12 +113,13 @@ silmarails:
|
|
100
113
|
```
|
101
114
|
<app/assets/stylesheets/application.css>
|
102
115
|
# add the following lines to ignore the scaffolds file and import the needed
|
103
|
-
# bootstrap
|
116
|
+
# bootstrap (if you are not using foundation, of course)
|
104
117
|
*= stub scaffolds
|
105
118
|
*= require bootstrap
|
106
119
|
|
107
120
|
<app/assets/javascripts/application.js>
|
108
|
-
# add the following lines to import the needed bootstrap
|
121
|
+
# add the following lines to import the needed bootstrap (if you are not using
|
122
|
+
# foundation, of course)
|
109
123
|
//= require bootstrap
|
110
124
|
//= require magic_view
|
111
125
|
|
data/lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/_form.html.erb
CHANGED
@@ -1,18 +1,20 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<%%= f
|
1
|
+
<div class="row">
|
2
|
+
<div class="small-8 small-offset-2
|
3
|
+
medium-6 medium-offset-3
|
4
|
+
large-4 large-offset-4 columns">
|
5
|
+
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
|
6
|
+
<%%= f.error_notification %>
|
6
7
|
|
7
|
-
|
8
|
+
<div class="form-inputs">
|
8
9
|
<%- attributes.each do |attribute| -%>
|
9
|
-
|
10
|
+
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
|
10
11
|
<%- end -%>
|
11
|
-
|
12
|
+
</div>
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
<div class="form-actions">
|
15
|
+
<%%= f.button :submit, class: "btn btn-primary pull-right" %>
|
16
|
+
</div>
|
17
|
+
<%% end %>
|
18
|
+
</div>
|
17
19
|
</div>
|
18
20
|
|
data/lib/generators/silmarails/install/files/foundation/templates/erb/scaffold/show.html.erb
CHANGED
@@ -7,14 +7,16 @@
|
|
7
7
|
<%%= link_to 'Back', <%= index_helper %>_path %>
|
8
8
|
</div>
|
9
9
|
|
10
|
-
<
|
11
|
-
|
12
|
-
|
10
|
+
<div class="row">
|
11
|
+
<div class="small-8 small-offset-2
|
12
|
+
medium-6 medium-offset-3
|
13
|
+
large-4 large-offset-4 columns">
|
13
14
|
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
<p>
|
16
|
+
<strong><%= attribute.human_name %>:</strong>
|
17
|
+
<%%= @<%= singular_table_name %>.<%= attribute.name %> %>
|
18
|
+
</p>
|
18
19
|
<% end -%>
|
19
|
-
</
|
20
|
+
</div>
|
21
|
+
</div>
|
20
22
|
|
data/lib/silmarails/version.rb
CHANGED