thesilverspoon 0.0.28 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/templates/layouts/scaffold.html.erb +32 -34
- data/lib/templates/views/erb/integrated_view.html.erb +6 -6
- data/lib/thesilverspoon.rb +2 -4
- data/lib/thesilverspoon/version.rb +1 -1
- data/thesilverspoon.gemspec +2 -1
- metadata +18 -42
- data/.gitignore~ +0 -4
- data/Gemfile~ +0 -6
- data/README.md~ +0 -149
- data/doc/README.rdoc~ +0 -12
- data/lib/integratedscaffold.rb~ +0 -299
- data/lib/templates/actions/create.rb~ +0 -12
- data/lib/templates/actions/destroy.rb~ +0 -10
- data/lib/templates/actions/edit.rb~ +0 -6
- data/lib/templates/actions/new.rb~ +0 -4
- data/lib/templates/actions/update.rb~ +0 -14
- data/lib/templates/assets/stylesheets/silverspoon.css.scss~ +0 -29
- data/lib/templates/controller.rb~ +0 -4
- data/lib/templates/layouts/application.html.erb~ +0 -80
- data/lib/templates/layouts/dummy_data.html.erb~ +0 -85
- data/lib/templates/layouts/general_layout.html.erb~ +0 -14
- data/lib/templates/model.rb~ +0 -54
- data/lib/templates/views/erb/edit.html.erb~ +0 -6
- data/lib/templates/views/erb/index.html.erb~ +0 -32
- data/lib/templates/views/erb/integrated_view.html.erb~ +0 -182
- data/lib/templates/views/erb/new.html.erb~ +0 -6
- data/lib/templates/views/erb/show.html.erb~ +0 -20
- data/lib/thesilverspoon.rb~ +0 -365
- data/lib/thesilverspoon/version.rb~ +0 -3
- data/thesilverspoon.gemspec~ +0 -39
@@ -2,13 +2,13 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>BrandName</title>
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
<%%= stylesheet_link_tag "application" %>
|
6
|
+
<%%= javascript_include_tag "application" %>
|
7
|
+
<%%= csrf_meta_tags %>
|
8
8
|
<script type="text/javascript">
|
9
9
|
$(function() {
|
10
10
|
$(".edit_link").click(function() {
|
11
|
-
$.get("
|
11
|
+
$.get("<%%=params[:controller]%>" + "/" + $(this).attr("id") + "/edit?get=1", function(data) {
|
12
12
|
|
13
13
|
$("#edit_form .modal-body").html(data);
|
14
14
|
$("#edit_form").modal('toggle');
|
@@ -17,7 +17,7 @@
|
|
17
17
|
});
|
18
18
|
});
|
19
19
|
</script>
|
20
|
-
|
20
|
+
<%%= yield(:head) %>
|
21
21
|
<style>
|
22
22
|
table td {
|
23
23
|
border: none;
|
@@ -32,29 +32,27 @@
|
|
32
32
|
<div id="wrapper">
|
33
33
|
<div class="navbar navbar-fixed-top" style="z-index: 999999999">
|
34
34
|
<div class="navbar-inner" style="z-index: 999999999">
|
35
|
-
<div class="
|
36
|
-
<
|
37
|
-
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
</ul>
|
35
|
+
<div class="container">
|
36
|
+
<a class="brand" href="/">BrandName</a>
|
37
|
+
<ul class="nav">
|
38
|
+
<li><a href="#about" style="color:white;">About</a></li>
|
39
|
+
<!--<li><a href="#contact" style="color:white;">Contact</a></li>-->
|
40
|
+
</ul>
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
|
42
|
+
<%% if !user_signed_in? %>
|
43
|
+
<%%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class =>"pull-right navbar-form"}) do |f| %>
|
44
|
+
<%%= f.email_field :email, :class=>"input-small", :placeholder=>"Email" %>
|
45
|
+
<%%= f.password_field :password, :class=>"input-small", :placeholder=>"Password" %>
|
46
|
+
<%%= f.submit "Sign In", :class=>"primary btn" %>
|
47
|
+
<%% end %>
|
48
|
+
<%% else %>
|
49
|
+
<div class="pull-right" style="margin-top: 10px;color:white;">
|
50
|
+
<%%= current_user.email %>
|
51
|
+
<span class="nav_link">
|
52
|
+
| <%%= link_to "Sign out", destroy_user_session_path, :method => :delete, :style=>"color:white;" %>
|
54
53
|
</span>
|
55
|
-
|
56
|
-
|
57
|
-
</div>
|
54
|
+
</div>
|
55
|
+
<%% end %>
|
58
56
|
</div>
|
59
57
|
</div>
|
60
58
|
</div>
|
@@ -62,25 +60,25 @@
|
|
62
60
|
|
63
61
|
<div class="page-header" style="height:100px"></div>
|
64
62
|
<div style="position:absolute;margin-top: -110px;" class="span16">
|
65
|
-
|
63
|
+
<%%= yield(:page_header) %>
|
66
64
|
</div>
|
67
65
|
|
68
66
|
<div class="content">
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
67
|
+
<%%= js extend_gritter :position => :bottom_right %>
|
68
|
+
<%%= js add_gritter(flash[:notice], :image => :success, :title => "Notice", :sticky => false, :time => 2000) %>
|
69
|
+
<%%= js add_gritter(flash[:alert], :image => :warning, :title => "Alert!", :sticky => false, :time => 2000) %>
|
70
|
+
<%%= yield %>
|
73
71
|
</div>
|
74
72
|
|
75
|
-
|
73
|
+
<%% if request.fullpath=="/" %>
|
76
74
|
|
77
75
|
|
78
76
|
|
79
|
-
|
77
|
+
<%% end %>
|
80
78
|
</div>
|
81
79
|
</div>
|
82
80
|
|
83
|
-
|
81
|
+
<%%= javascript_include_tag "/assets/exclusions/jquery.pageslide" %>
|
84
82
|
|
85
83
|
|
86
84
|
</body>
|
@@ -35,12 +35,12 @@ $('form').submit(function() {
|
|
35
35
|
<table>
|
36
36
|
<tr>
|
37
37
|
<td>
|
38
|
-
<a href="#" data-
|
38
|
+
<a href="#" data-toggle="modal" data-target="#new_form">
|
39
39
|
<%%= image_tag('new.png', :size=>"32x32") %>
|
40
40
|
</a>
|
41
41
|
</td>
|
42
42
|
<td>
|
43
|
-
|
43
|
+
<a href="#" data-toggle="modal" data-target="#new_form">
|
44
44
|
<h2>Create New</h2>
|
45
45
|
</a>
|
46
46
|
|
@@ -77,12 +77,12 @@ $('form').submit(function() {
|
|
77
77
|
</tr>
|
78
78
|
<tr>
|
79
79
|
<td>
|
80
|
-
<a href="#" data-
|
80
|
+
<a href="#" data-toggle="modal" data-target="#upload_form">
|
81
81
|
<%%= image_tag('upload.png', :size=>"32x32") %>
|
82
82
|
</a>
|
83
83
|
</td>
|
84
84
|
<td>
|
85
|
-
<a href="#" data-
|
85
|
+
<a href="#" data-toggle="modal" data-target="#upload_form">
|
86
86
|
<h2>Upload</h2>
|
87
87
|
</a>
|
88
88
|
|
@@ -125,7 +125,7 @@ $('form').submit(function() {
|
|
125
125
|
|
126
126
|
</div>
|
127
127
|
|
128
|
-
<div class="
|
128
|
+
<div class="span8">
|
129
129
|
<table class="jqueried_table display" cellpadding="0" cellspacing="0" border="0" id="example">
|
130
130
|
<thead>
|
131
131
|
<tr>
|
@@ -140,7 +140,7 @@ $('form').submit(function() {
|
|
140
140
|
<tr>
|
141
141
|
<%- for attribute in @model_attributes -%>
|
142
142
|
<td style="border-right: 1px solid #d3d3d3">
|
143
|
-
<a href="#" data-
|
143
|
+
<a href="#" data-toggle="modal" data-target="#show_details"><%%= <%= instance_name %>
|
144
144
|
.<%= attribute.name %> %></a>
|
145
145
|
</td>
|
146
146
|
<%- end %>
|
data/lib/thesilverspoon.rb
CHANGED
@@ -332,10 +332,8 @@ inject_into_file "config/routes.rb",s,:after=>"# root :to => 'welcome#index'\n"
|
|
332
332
|
# inject_into_file "config/application.rb", "require 'bootstrap-sass'\n", :after=>"require File.expand_path('../boot', __FILE__)\n"
|
333
333
|
inject_into_file "config/application.rb", "require 'bootstrapped'\n", :after=>"require 'rails/all'\n"
|
334
334
|
inject_into_file "config/application.rb", "require 'gritter'\n", :after=>"require 'rails/all'\n"
|
335
|
-
|
336
|
-
|
337
|
-
inject_into_file "app/assets/stylesheets/application.css", '*=require_directory', :before=>"*/"
|
338
|
-
|
335
|
+
inject_into_file "app/assets/stylesheets/application.css", "*=require_directory\n", :before=>"*/"
|
336
|
+
inject_into_file "app/assets/stylesheets/application.css", "*=require bootstrap\n", :before=>"*/"
|
339
337
|
append_to_file "app/assets/javascripts/application.js", '//= require bootstrap'
|
340
338
|
inject_into_file "app/controllers/application_controller.rb", "before_filter :authenticate_user!\n", :after=>" protect_from_forgery\n"
|
341
339
|
|
data/thesilverspoon.gemspec
CHANGED
@@ -23,7 +23,8 @@ Gem::Specification.new do |s|
|
|
23
23
|
# s.add_runtime_dependency "rest-client"
|
24
24
|
|
25
25
|
|
26
|
-
|
26
|
+
|
27
|
+
s.add_dependency 'anjlab-bootstrap-rails', '>= 2.0'
|
27
28
|
s.add_dependency 'gritter'
|
28
29
|
s.add_dependency 'spreadsheet'
|
29
30
|
s.add_dependency 'carrierwave'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thesilverspoon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-13 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: &
|
15
|
+
name: anjlab-bootstrap-rails
|
16
|
+
requirement: &86901830 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
21
|
+
version: '2.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *86901830
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: gritter
|
27
|
-
requirement: &
|
27
|
+
requirement: &86901610 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *86901610
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: spreadsheet
|
38
|
-
requirement: &
|
38
|
+
requirement: &86901360 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *86901360
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: carrierwave
|
49
|
-
requirement: &
|
49
|
+
requirement: &86901120 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *86901120
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: devise
|
60
|
-
requirement: &
|
60
|
+
requirement: &86900900 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *86900900
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cancan
|
71
|
-
requirement: &
|
71
|
+
requirement: &86900650 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *86900650
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: nifty-generators
|
82
|
-
requirement: &
|
82
|
+
requirement: &86900380 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *86900380
|
91
91
|
description: This gem preps a new Rails app with some of the best Rails gems and Jquery
|
92
92
|
sweetness available( Twitter-Bootstrap, Devise, CanCan, Rails Admin, Spreadsheet,
|
93
93
|
) Not only does it takes care of the installation of these gems, it also extends
|
@@ -102,11 +102,8 @@ extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
104
|
- .gitignore
|
105
|
-
- .gitignore~
|
106
105
|
- Gemfile
|
107
|
-
- Gemfile~
|
108
106
|
- README.md
|
109
|
-
- README.md~
|
110
107
|
- README.rdoc
|
111
108
|
- Rakefile
|
112
109
|
- doc/<.html
|
@@ -119,7 +116,6 @@ files:
|
|
119
116
|
- doc/Gemfile~.html
|
120
117
|
- doc/Object.html
|
121
118
|
- doc/README.rdoc
|
122
|
-
- doc/README.rdoc~
|
123
119
|
- doc/README_rdoc.html
|
124
120
|
- doc/Rakefile.html
|
125
121
|
- doc/The_silver_spoon.html
|
@@ -161,21 +157,15 @@ files:
|
|
161
157
|
- doc/rdoc.css
|
162
158
|
- doc/table_of_contents.html
|
163
159
|
- lib/integratedscaffold.rb
|
164
|
-
- lib/integratedscaffold.rb~
|
165
160
|
- lib/templates/actions/create.rb
|
166
|
-
- lib/templates/actions/create.rb~
|
167
161
|
- lib/templates/actions/destroy.rb
|
168
|
-
- lib/templates/actions/destroy.rb~
|
169
162
|
- lib/templates/actions/edit.rb
|
170
|
-
- lib/templates/actions/edit.rb~
|
171
163
|
- lib/templates/actions/index.rb
|
172
164
|
- lib/templates/actions/integrated_view.rb
|
173
165
|
- lib/templates/actions/new.rb
|
174
|
-
- lib/templates/actions/new.rb~
|
175
166
|
- lib/templates/actions/parse_save_from_excel.rb
|
176
167
|
- lib/templates/actions/show.rb
|
177
168
|
- lib/templates/actions/update.rb
|
178
|
-
- lib/templates/actions/update.rb~
|
179
169
|
- lib/templates/application_helper.rb
|
180
170
|
- lib/templates/assets/images/background.jpg
|
181
171
|
- lib/templates/assets/images/download.png
|
@@ -234,41 +224,27 @@ files:
|
|
234
224
|
- lib/templates/assets/stylesheets/jquery-ui-1.8.17.custom.css
|
235
225
|
- lib/templates/assets/stylesheets/jquery_data_table.css
|
236
226
|
- lib/templates/assets/stylesheets/silverspoon.css.scss
|
237
|
-
- lib/templates/assets/stylesheets/silverspoon.css.scss~
|
238
227
|
- lib/templates/controller.rb
|
239
|
-
- lib/templates/controller.rb~
|
240
228
|
- lib/templates/file_uploader.rb
|
241
229
|
- lib/templates/helper.rb
|
242
230
|
- lib/templates/layouts/application.html.erb
|
243
|
-
- lib/templates/layouts/application.html.erb~
|
244
231
|
- lib/templates/layouts/dummy_data.html.erb
|
245
|
-
- lib/templates/layouts/dummy_data.html.erb~
|
246
232
|
- lib/templates/layouts/general_layout.html.erb
|
247
|
-
- lib/templates/layouts/general_layout.html.erb~
|
248
233
|
- lib/templates/layouts/information_page.html.erb
|
249
234
|
- lib/templates/layouts/pageslide_form_at.html.erb
|
250
235
|
- lib/templates/layouts/scaffold.html.erb
|
251
236
|
- lib/templates/layouts/welcome.html.erb
|
252
237
|
- lib/templates/migration.rb
|
253
238
|
- lib/templates/model.rb
|
254
|
-
- lib/templates/model.rb~
|
255
239
|
- lib/templates/views/erb/_form.html.erb
|
256
240
|
- lib/templates/views/erb/edit.html.erb
|
257
|
-
- lib/templates/views/erb/edit.html.erb~
|
258
241
|
- lib/templates/views/erb/index.html.erb
|
259
|
-
- lib/templates/views/erb/index.html.erb~
|
260
242
|
- lib/templates/views/erb/integrated_view.html.erb
|
261
|
-
- lib/templates/views/erb/integrated_view.html.erb~
|
262
243
|
- lib/templates/views/erb/new.html.erb
|
263
|
-
- lib/templates/views/erb/new.html.erb~
|
264
244
|
- lib/templates/views/erb/show.html.erb
|
265
|
-
- lib/templates/views/erb/show.html.erb~
|
266
245
|
- lib/thesilverspoon.rb
|
267
|
-
- lib/thesilverspoon.rb~
|
268
246
|
- lib/thesilverspoon/version.rb
|
269
|
-
- lib/thesilverspoon/version.rb~
|
270
247
|
- thesilverspoon.gemspec
|
271
|
-
- thesilverspoon.gemspec~
|
272
248
|
homepage: https://github.com/ptotemy/thesilverspoon
|
273
249
|
licenses: []
|
274
250
|
post_install_message:
|
data/.gitignore~
DELETED
data/Gemfile~
DELETED
data/README.md~
DELETED
@@ -1,149 +0,0 @@
|
|
1
|
-
|
2
|
-
# The Silver Spoon
|
3
|
-
|
4
|
-
Let your Rails App be born with a silver spoon in its mouth.
|
5
|
-
|
6
|
-
This gem preps a new Rails app with some of the best Rails gems and Jquery sweetness available:
|
7
|
-
|
8
|
-
* <b>Rails Admin</b> for System Management : https://github.com/sferik/rails_admin
|
9
|
-
* <b>Devise</b> for Authentication : https://github.com/plataformatec/devise
|
10
|
-
* <b>Cancan</b> for Authorization : https://github.com/ryanb/cancan
|
11
|
-
* <b>Bootstrapped</b> for Layout Design : https://github.com/entropillc/bootstrapped
|
12
|
-
* <b>NiftyGenerators</b> for Form Design : https://github.com/ryanb/nifty-generators
|
13
|
-
* <b>Gritter</b> for Notifications : https://github.com/RobinBrouwer/gritter
|
14
|
-
* <b>Carrierwave</b> for File Uploading : https://github.com/jnicklas/carrierwave
|
15
|
-
* <b>Spreadsheet</b> for Excel File Handling : http://spreadsheet.rubyforge.org/
|
16
|
-
|
17
|
-
The Silver Spoon takes care of the installation of these gems, and basic implementations of the functionalities. As long as you can live with the conventional defaults specified for these gems, you will be ready to go. If you need customization, you would need to understand the usage of each of these gems individually, which you will find at the respective gem homepages.
|
18
|
-
|
19
|
-
Apart from this, The Silver Spoon also extends the scaffolding in your app.
|
20
|
-
* It uses a combination of the Twitter-Bootstrap and Nifty-Generators to give aesthetically improved and more usable view templates.
|
21
|
-
* Apart from the standard scaffold views, it also creates an AJAX driven integrated view which combines all the standard views into one.
|
22
|
-
* It also adds schema stubs and standard validation options (uncomment these to use) to your models.
|
23
|
-
|
24
|
-
##Note
|
25
|
-
"Updated to use Bootstrap 2.0"
|
26
|
-
|
27
|
-
|
28
|
-
## Installation
|
29
|
-
|
30
|
-
|
31
|
-
The Silver Spoon works best if you use it in a new empty Rails App. It requires anything Rails 3.1.3 onwards.
|
32
|
-
|
33
|
-
You can install it by simply adding the following lines to your Gemfile:
|
34
|
-
|
35
|
-
```console
|
36
|
-
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
|
37
|
-
gem 'thesilverspoon'
|
38
|
-
```
|
39
|
-
|
40
|
-
Now run bundle install. After you have installed The Silver Spoon, you need to run the generator:
|
41
|
-
|
42
|
-
```console
|
43
|
-
rails generate thesilverspoon:install
|
44
|
-
```
|
45
|
-
|
46
|
-
Rails Admin will ask two questions, just press Enter to accept the defaults.
|
47
|
-
Run <b>rake db:migrate</b> <u>and</u> <b>rake db:seed</b> to finish the installation.
|
48
|
-
|
49
|
-
<b>N.B.</b> The db/seeds.rb file contains the creation code for the admin user. You can edit this before 'rake db:seed' to create your own admin credentials instead.
|
50
|
-
|
51
|
-
## Setup
|
52
|
-
|
53
|
-
Post installation, your app will have the following:
|
54
|
-
|
55
|
-
* All the gems mentioned above with standard configurations initialized.
|
56
|
-
* A model called _'User'_ and views (in the devise directory) for you to customize
|
57
|
-
* An Ability model to enable *Cancan* for your authorization. You also get a admin user (email:admin@tss.com | password: secret) with administrative rights to the system. Remember to change the password before you deploy the app.
|
58
|
-
* An Uploader Model in a uploaders directory and an uploading repository in /public to enable CarrierWave.
|
59
|
-
* A Rails Admin interface at /admin. Login with the admin user credentials to use this section
|
60
|
-
* A set of basic image assets which you can use or replace to quickly start off your app.
|
61
|
-
|
62
|
-
The root location would have been mapped to welcome#index and the relevant controller-action would have been created. Delete public/index.html to access the root location.
|
63
|
-
|
64
|
-
## Usage
|
65
|
-
|
66
|
-
Naturally, you have access all the features that are available in each of the included gems. We recommend that you go through the documentation of the included gems to fully realize the amazing power these put into your hands.
|
67
|
-
|
68
|
-
### Layouts
|
69
|
-
The app has been started off with the standard Rails layout. The Silver Spoon allows you to manipulate layouts with the following commands:
|
70
|
-
|
71
|
-
* To use the Nifty Generators style layout
|
72
|
-
|
73
|
-
```console
|
74
|
-
rails generate nifty:layout
|
75
|
-
```
|
76
|
-
|
77
|
-
* To use the the Bootstrapped layout
|
78
|
-
|
79
|
-
```console
|
80
|
-
rails generate bootstrapped:layout
|
81
|
-
```
|
82
|
-
|
83
|
-
* To revert back to the default Rails layout
|
84
|
-
|
85
|
-
```console
|
86
|
-
rails generate revert:layout
|
87
|
-
```
|
88
|
-
|
89
|
-
### Scaffolds
|
90
|
-
|
91
|
-
The Silver Spoon gives you the option of four scaffold styles:
|
92
|
-
|
93
|
-
* To use The Silver Spoon scaffold
|
94
|
-
|
95
|
-
```console
|
96
|
-
rails generate everything:scaffold Model [parameters]
|
97
|
-
```
|
98
|
-
|
99
|
-
This creates a special layout for the scaffold, over-riding your application layout. Besides the standard views, you can also use an integrated view at '/tablename_integrated_view'
|
100
|
-
|
101
|
-
* To use the Nifty Generators scaffold
|
102
|
-
|
103
|
-
```console
|
104
|
-
rails generate nifty:scaffold Model [parameters]
|
105
|
-
```
|
106
|
-
|
107
|
-
* To use the the Bootstrapped scaffold
|
108
|
-
|
109
|
-
```console
|
110
|
-
rails generate bootstrapped:scaffold Model [parameters]
|
111
|
-
```
|
112
|
-
|
113
|
-
* To use the default Rails scaffold
|
114
|
-
|
115
|
-
```console
|
116
|
-
rails generate scaffold Model [parameters]
|
117
|
-
```
|
118
|
-
|
119
|
-
|
120
|
-
## Additional Information
|
121
|
-
|
122
|
-
### Bug reports
|
123
|
-
|
124
|
-
If you discover a problem with The Silver Spoon, we would like to know about it. However, please do *NOT* use the GitHub issue tracker. Send an email to the maintainers listed at the bottom of the README.
|
125
|
-
|
126
|
-
### Starting with Rails?
|
127
|
-
|
128
|
-
If you are building your first Rails application, we recommend you to *not* use The Silver Spoon. The Silver Spoon is an aggregation of a set of gems which require a good understanding of the Rails Framework. In such cases, we advise you to build everything from scratch, using the constituent gems of The Silver Spoon one at a time, to better understand their functions and super-powers.
|
129
|
-
|
130
|
-
Once you have solidified your understanding of Rails and the Gems included here, we believe you will find that The Silver Spoon is a good starting point for new apps.
|
131
|
-
|
132
|
-
### Ackowledgement and Disclaimer
|
133
|
-
|
134
|
-
We stake no claim to having built or modified any of the Gems included in this package. They are included on an as-is-where-is basis and are subject to their own individual licenses, terms of usage, copyrights and disclaimers. We are not legal experts, so if we are treading on anybody's toes, please let us know and we will remove any components you have an objection to.
|
135
|
-
|
136
|
-
Moreover, if you like The Silver Spoon, please consider leaving comments and compliments at the co-ordinates of the original Gem authors, for as they say, if we appear tall it is because we are standing on the shoulder of giants.
|
137
|
-
|
138
|
-
Also, wanted to recommend the JetBrains RubyMine IDE, which we are in no way affiliated to, but which has been critical in our Rails learning path.
|
139
|
-
|
140
|
-
### Maintainers
|
141
|
-
|
142
|
-
* Rushabh Hathi (rushabh@ptotem.com)
|
143
|
-
* Arijit Lahiri (arijit@ptotem.com)
|
144
|
-
|
145
|
-
|
146
|
-
## License
|
147
|
-
|
148
|
-
MIT License. Copyright 2012 Ptotem Learning Projects LLP. http://www.ptotem.com
|
149
|
-
|