typus 3.0.11.rc5 → 3.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +3 -0
- data/app/views/admin/templates/_text_with_ckeditor.html.erb +13 -0
- data/lib/typus/version.rb +1 -1
- metadata +20 -272
- data/test/fixtures/rails_app/.gitignore +0 -4
- data/test/fixtures/rails_app/Capfile +0 -6
- data/test/fixtures/rails_app/README +0 -256
- data/test/fixtures/rails_app/Rakefile +0 -7
- data/test/fixtures/rails_app/app/controllers/admin/animals_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/articles_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/assets_controller.rb +0 -51
- data/test/fixtures/rails_app/app/controllers/admin/birds_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/cases_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/categories_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/comments_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/dogs_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/entries_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/hits_controller.rb +0 -37
- data/test/fixtures/rails_app/app/controllers/admin/image_holders_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/invoices_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/orders_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/pages_controller.rb +0 -7
- data/test/fixtures/rails_app/app/controllers/admin/posts_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/project_collaborators_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/projects_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/status_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/typus_users_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/users_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin/views_controller.rb +0 -8
- data/test/fixtures/rails_app/app/controllers/admin/watch_dog_controller.rb +0 -2
- data/test/fixtures/rails_app/app/controllers/admin_user.rb +0 -3
- data/test/fixtures/rails_app/app/controllers/application_controller.rb +0 -3
- data/test/fixtures/rails_app/app/helpers/application_helper.rb +0 -2
- data/test/fixtures/rails_app/app/helpers/form_helper.rb +0 -3
- data/test/fixtures/rails_app/app/models/animal.rb +0 -21
- data/test/fixtures/rails_app/app/models/article.rb +0 -10
- data/test/fixtures/rails_app/app/models/asset.rb +0 -45
- data/test/fixtures/rails_app/app/models/bird.rb +0 -2
- data/test/fixtures/rails_app/app/models/case.rb +0 -2
- data/test/fixtures/rails_app/app/models/category.rb +0 -31
- data/test/fixtures/rails_app/app/models/comment.rb +0 -17
- data/test/fixtures/rails_app/app/models/delayed/task.rb +0 -5
- data/test/fixtures/rails_app/app/models/dog.rb +0 -2
- data/test/fixtures/rails_app/app/models/entry.rb +0 -23
- data/test/fixtures/rails_app/app/models/hit.rb +0 -27
- data/test/fixtures/rails_app/app/models/image_holder.rb +0 -21
- data/test/fixtures/rails_app/app/models/invoice.rb +0 -10
- data/test/fixtures/rails_app/app/models/order.rb +0 -9
- data/test/fixtures/rails_app/app/models/page.rb +0 -24
- data/test/fixtures/rails_app/app/models/post.rb +0 -32
- data/test/fixtures/rails_app/app/models/project.rb +0 -17
- data/test/fixtures/rails_app/app/models/project_collaborator.rb +0 -16
- data/test/fixtures/rails_app/app/models/site.rb +0 -16
- data/test/fixtures/rails_app/app/models/typus_user.rb +0 -22
- data/test/fixtures/rails_app/app/models/user.rb +0 -10
- data/test/fixtures/rails_app/app/models/view.rb +0 -19
- data/test/fixtures/rails_app/app/views/admin/assets/_index.html.erb +0 -3
- data/test/fixtures/rails_app/app/views/admin/cases/_index.html.erb +0 -3
- data/test/fixtures/rails_app/app/views/admin/categories/_index.html.erb +0 -3
- data/test/fixtures/rails_app/app/views/admin/dashboard/_sidebar.html.erb +0 -11
- data/test/fixtures/rails_app/app/views/admin/entries/_index.html.erb +0 -3
- data/test/fixtures/rails_app/app/views/admin/hits/_edit.html.erb +0 -7
- data/test/fixtures/rails_app/app/views/admin/hits/_index.html.erb +0 -3
- data/test/fixtures/rails_app/app/views/admin/hits/index.html.erb +0 -28
- data/test/fixtures/rails_app/app/views/admin/pages/_index.html.erb +0 -3
- data/test/fixtures/rails_app/app/views/admin/posts/_edit.html.erb +0 -1
- data/test/fixtures/rails_app/app/views/admin/posts/_index.html.erb +0 -5
- data/test/fixtures/rails_app/app/views/admin/posts/_new.html.erb +0 -1
- data/test/fixtures/rails_app/app/views/admin/posts/_show.html.erb +0 -1
- data/test/fixtures/rails_app/app/views/admin/resources/_sidebar.html.erb +0 -1
- data/test/fixtures/rails_app/app/views/admin/status/index.html.erb +0 -9
- data/test/fixtures/rails_app/app/views/admin/templates/_datepicker.html.erb +0 -1
- data/test/fixtures/rails_app/app/views/admin/watch_dog/index.html.erb +0 -9
- data/test/fixtures/rails_app/config.ru +0 -4
- data/test/fixtures/rails_app/config/application.rb +0 -44
- data/test/fixtures/rails_app/config/boot.rb +0 -6
- data/test/fixtures/rails_app/config/database.yml +0 -34
- data/test/fixtures/rails_app/config/deploy.rb +0 -32
- data/test/fixtures/rails_app/config/environment.rb +0 -5
- data/test/fixtures/rails_app/config/environments/development.rb +0 -32
- data/test/fixtures/rails_app/config/environments/production.rb +0 -54
- data/test/fixtures/rails_app/config/environments/test.rb +0 -40
- data/test/fixtures/rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/test/fixtures/rails_app/config/initializers/dragonfly.rb +0 -1
- data/test/fixtures/rails_app/config/initializers/inflections.rb +0 -12
- data/test/fixtures/rails_app/config/initializers/mime_types.rb +0 -5
- data/test/fixtures/rails_app/config/initializers/secret_token.rb +0 -7
- data/test/fixtures/rails_app/config/initializers/session_store.rb +0 -8
- data/test/fixtures/rails_app/config/initializers/typus.rb +0 -5
- data/test/fixtures/rails_app/config/initializers/typus_resources.rb +0 -27
- data/test/fixtures/rails_app/config/locales/en.yml +0 -5
- data/test/fixtures/rails_app/config/mongoid.yml +0 -20
- data/test/fixtures/rails_app/config/routes.rb +0 -61
- data/test/fixtures/rails_app/config/typus/README +0 -68
- data/test/fixtures/rails_app/config/typus/crud_basic.yml +0 -10
- data/test/fixtures/rails_app/config/typus/crud_basic_roles.yml +0 -2
- data/test/fixtures/rails_app/config/typus/crud_extended.yml +0 -66
- data/test/fixtures/rails_app/config/typus/crud_extended_roles.yml +0 -18
- data/test/fixtures/rails_app/config/typus/has_many.yml +0 -0
- data/test/fixtures/rails_app/config/typus/has_many_roles.yml +0 -0
- data/test/fixtures/rails_app/config/typus/has_many_through.yml +0 -23
- data/test/fixtures/rails_app/config/typus/has_many_through_roles.yml +0 -4
- data/test/fixtures/rails_app/config/typus/has_one.yml +0 -12
- data/test/fixtures/rails_app/config/typus/has_one_roles.yml +0 -3
- data/test/fixtures/rails_app/config/typus/mongo_db.yml +0 -4
- data/test/fixtures/rails_app/config/typus/mongo_db_roles.yml +0 -2
- data/test/fixtures/rails_app/config/typus/polymorphic.yml +0 -17
- data/test/fixtures/rails_app/config/typus/polymorphic_roles.yml +0 -5
- data/test/fixtures/rails_app/config/typus/resource_roles.yml +0 -7
- data/test/fixtures/rails_app/config/typus/sti.yml +0 -5
- data/test/fixtures/rails_app/config/typus/sti_roles.yml +0 -2
- data/test/fixtures/rails_app/config/typus/typus.yml +0 -13
- data/test/fixtures/rails_app/config/typus/typus_roles.yml +0 -2
- data/test/fixtures/rails_app/config/typus/unknown.yml +0 -3
- data/test/fixtures/rails_app/config/typus/unknown_roles.yml +0 -5
- data/test/fixtures/rails_app/db/.gitkeep +0 -0
- data/test/fixtures/rails_app/db/schema.rb +0 -200
- data/test/fixtures/rails_app/db/seeds.rb +0 -54
- data/test/fixtures/rails_app/db/seeds/assets/000.jpg +0 -0
- data/test/fixtures/rails_app/db/seeds/assets/001.jpg +0 -0
- data/test/fixtures/rails_app/db/seeds/assets/002.jpg +0 -0
- data/test/fixtures/rails_app/db/seeds/assets/003.jpg +0 -0
- data/test/fixtures/rails_app/db/seeds/assets/004.jpg +0 -0
- data/test/fixtures/rails_app/public/404.html +0 -26
- data/test/fixtures/rails_app/public/422.html +0 -26
- data/test/fixtures/rails_app/public/500.html +0 -26
- data/test/fixtures/rails_app/public/favicon.ico +0 -0
- data/test/fixtures/rails_app/public/images/rails.png +0 -0
- data/test/fixtures/rails_app/public/robots.txt +0 -5
- data/test/fixtures/rails_app/public/stylesheets/.gitkeep +0 -0
- data/test/fixtures/rails_app/script/rails +0 -6
data/.gitmodules
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
<% content_for :javascripts do %>
|
2
|
+
<%= javascript_include_tag '/vendor/ckeditor/ckeditor' %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%
|
6
|
+
custom = { :rows => @resource.typus_options_for(:form_rows), :class => "ckeditor" }
|
7
|
+
options = options.merge!(custom)
|
8
|
+
%>
|
9
|
+
|
10
|
+
<li id="<%= attribute %>">
|
11
|
+
<%= form.label attribute, label_text.html_safe %>
|
12
|
+
<%= form.text_area attribute, options %>
|
13
|
+
</li>
|
data/lib/typus/version.rb
CHANGED
metadata
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.11
|
5
|
-
prerelease:
|
4
|
+
version: 3.0.11
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Francesc Esplugas
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-07-13 00:00:00.000000000 +02:00
|
13
|
+
default_executable:
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: bcrypt-ruby
|
16
|
-
requirement: &
|
17
|
+
requirement: &2156431880 !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
19
|
requirements:
|
19
20
|
- - ! '>='
|
@@ -21,10 +22,10 @@ dependencies:
|
|
21
22
|
version: '0'
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
+
version_requirements: *2156431880
|
25
26
|
- !ruby/object:Gem::Dependency
|
26
27
|
name: fastercsv
|
27
|
-
requirement: &
|
28
|
+
requirement: &2156421280 !ruby/object:Gem::Requirement
|
28
29
|
none: false
|
29
30
|
requirements:
|
30
31
|
- - ~>
|
@@ -32,10 +33,10 @@ dependencies:
|
|
32
33
|
version: '1.5'
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
+
version_requirements: *2156421280
|
36
37
|
- !ruby/object:Gem::Dependency
|
37
38
|
name: rails
|
38
|
-
requirement: &
|
39
|
+
requirement: &2156420720 !ruby/object:Gem::Requirement
|
39
40
|
none: false
|
40
41
|
requirements:
|
41
42
|
- - ~>
|
@@ -43,10 +44,10 @@ dependencies:
|
|
43
44
|
version: 3.0.8
|
44
45
|
type: :runtime
|
45
46
|
prerelease: false
|
46
|
-
version_requirements: *
|
47
|
+
version_requirements: *2156420720
|
47
48
|
- !ruby/object:Gem::Dependency
|
48
49
|
name: render_inheritable
|
49
|
-
requirement: &
|
50
|
+
requirement: &2156420300 !ruby/object:Gem::Requirement
|
50
51
|
none: false
|
51
52
|
requirements:
|
52
53
|
- - ! '>='
|
@@ -54,10 +55,10 @@ dependencies:
|
|
54
55
|
version: '0'
|
55
56
|
type: :runtime
|
56
57
|
prerelease: false
|
57
|
-
version_requirements: *
|
58
|
+
version_requirements: *2156420300
|
58
59
|
- !ruby/object:Gem::Dependency
|
59
60
|
name: will_paginate
|
60
|
-
requirement: &
|
61
|
+
requirement: &2156419760 !ruby/object:Gem::Requirement
|
61
62
|
none: false
|
62
63
|
requirements:
|
63
64
|
- - ~>
|
@@ -65,7 +66,7 @@ dependencies:
|
|
65
66
|
version: 3.0.pre2
|
66
67
|
type: :runtime
|
67
68
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
+
version_requirements: *2156419760
|
69
70
|
description: Ruby on Rails Admin Panel (Engine) to allow trusted users edit structured
|
70
71
|
content.
|
71
72
|
email:
|
@@ -75,6 +76,7 @@ extensions: []
|
|
75
76
|
extra_rdoc_files: []
|
76
77
|
files:
|
77
78
|
- .gitignore
|
79
|
+
- .gitmodules
|
78
80
|
- Gemfile
|
79
81
|
- MIT-LICENSE
|
80
82
|
- README.md
|
@@ -199,6 +201,7 @@ files:
|
|
199
201
|
- app/views/admin/templates/_selector.html.erb
|
200
202
|
- app/views/admin/templates/_string.html.erb
|
201
203
|
- app/views/admin/templates/_text.html.erb
|
204
|
+
- app/views/admin/templates/_text_with_ckeditor.html.erb
|
202
205
|
- app/views/admin/templates/_time.html.erb
|
203
206
|
- app/views/admin/templates/_tree.html.erb
|
204
207
|
- app/views/layouts/admin/base.html.erb
|
@@ -333,134 +336,6 @@ files:
|
|
333
336
|
- test/fixtures/config/ordered/002_roles.yml
|
334
337
|
- test/fixtures/config/unordered/app_one_roles.yml
|
335
338
|
- test/fixtures/config/unordered/app_two_roles.yml
|
336
|
-
- test/fixtures/rails_app/.gitignore
|
337
|
-
- test/fixtures/rails_app/Capfile
|
338
|
-
- test/fixtures/rails_app/README
|
339
|
-
- test/fixtures/rails_app/Rakefile
|
340
|
-
- test/fixtures/rails_app/app/controllers/admin/animals_controller.rb
|
341
|
-
- test/fixtures/rails_app/app/controllers/admin/articles_controller.rb
|
342
|
-
- test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
|
343
|
-
- test/fixtures/rails_app/app/controllers/admin/birds_controller.rb
|
344
|
-
- test/fixtures/rails_app/app/controllers/admin/cases_controller.rb
|
345
|
-
- test/fixtures/rails_app/app/controllers/admin/categories_controller.rb
|
346
|
-
- test/fixtures/rails_app/app/controllers/admin/comments_controller.rb
|
347
|
-
- test/fixtures/rails_app/app/controllers/admin/dogs_controller.rb
|
348
|
-
- test/fixtures/rails_app/app/controllers/admin/entries_controller.rb
|
349
|
-
- test/fixtures/rails_app/app/controllers/admin/hits_controller.rb
|
350
|
-
- test/fixtures/rails_app/app/controllers/admin/image_holders_controller.rb
|
351
|
-
- test/fixtures/rails_app/app/controllers/admin/invoices_controller.rb
|
352
|
-
- test/fixtures/rails_app/app/controllers/admin/orders_controller.rb
|
353
|
-
- test/fixtures/rails_app/app/controllers/admin/pages_controller.rb
|
354
|
-
- test/fixtures/rails_app/app/controllers/admin/posts_controller.rb
|
355
|
-
- test/fixtures/rails_app/app/controllers/admin/project_collaborators_controller.rb
|
356
|
-
- test/fixtures/rails_app/app/controllers/admin/projects_controller.rb
|
357
|
-
- test/fixtures/rails_app/app/controllers/admin/status_controller.rb
|
358
|
-
- test/fixtures/rails_app/app/controllers/admin/typus_users_controller.rb
|
359
|
-
- test/fixtures/rails_app/app/controllers/admin/users_controller.rb
|
360
|
-
- test/fixtures/rails_app/app/controllers/admin/views_controller.rb
|
361
|
-
- test/fixtures/rails_app/app/controllers/admin/watch_dog_controller.rb
|
362
|
-
- test/fixtures/rails_app/app/controllers/admin_user.rb
|
363
|
-
- test/fixtures/rails_app/app/controllers/application_controller.rb
|
364
|
-
- test/fixtures/rails_app/app/helpers/application_helper.rb
|
365
|
-
- test/fixtures/rails_app/app/helpers/form_helper.rb
|
366
|
-
- test/fixtures/rails_app/app/models/animal.rb
|
367
|
-
- test/fixtures/rails_app/app/models/article.rb
|
368
|
-
- test/fixtures/rails_app/app/models/asset.rb
|
369
|
-
- test/fixtures/rails_app/app/models/bird.rb
|
370
|
-
- test/fixtures/rails_app/app/models/case.rb
|
371
|
-
- test/fixtures/rails_app/app/models/category.rb
|
372
|
-
- test/fixtures/rails_app/app/models/comment.rb
|
373
|
-
- test/fixtures/rails_app/app/models/delayed/task.rb
|
374
|
-
- test/fixtures/rails_app/app/models/dog.rb
|
375
|
-
- test/fixtures/rails_app/app/models/entry.rb
|
376
|
-
- test/fixtures/rails_app/app/models/hit.rb
|
377
|
-
- test/fixtures/rails_app/app/models/image_holder.rb
|
378
|
-
- test/fixtures/rails_app/app/models/invoice.rb
|
379
|
-
- test/fixtures/rails_app/app/models/order.rb
|
380
|
-
- test/fixtures/rails_app/app/models/page.rb
|
381
|
-
- test/fixtures/rails_app/app/models/post.rb
|
382
|
-
- test/fixtures/rails_app/app/models/project.rb
|
383
|
-
- test/fixtures/rails_app/app/models/project_collaborator.rb
|
384
|
-
- test/fixtures/rails_app/app/models/site.rb
|
385
|
-
- test/fixtures/rails_app/app/models/typus_user.rb
|
386
|
-
- test/fixtures/rails_app/app/models/user.rb
|
387
|
-
- test/fixtures/rails_app/app/models/view.rb
|
388
|
-
- test/fixtures/rails_app/app/views/admin/assets/_index.html.erb
|
389
|
-
- test/fixtures/rails_app/app/views/admin/cases/_index.html.erb
|
390
|
-
- test/fixtures/rails_app/app/views/admin/categories/_index.html.erb
|
391
|
-
- test/fixtures/rails_app/app/views/admin/dashboard/_sidebar.html.erb
|
392
|
-
- test/fixtures/rails_app/app/views/admin/entries/_index.html.erb
|
393
|
-
- test/fixtures/rails_app/app/views/admin/hits/_edit.html.erb
|
394
|
-
- test/fixtures/rails_app/app/views/admin/hits/_index.html.erb
|
395
|
-
- test/fixtures/rails_app/app/views/admin/hits/index.html.erb
|
396
|
-
- test/fixtures/rails_app/app/views/admin/pages/_index.html.erb
|
397
|
-
- test/fixtures/rails_app/app/views/admin/posts/_edit.html.erb
|
398
|
-
- test/fixtures/rails_app/app/views/admin/posts/_index.html.erb
|
399
|
-
- test/fixtures/rails_app/app/views/admin/posts/_new.html.erb
|
400
|
-
- test/fixtures/rails_app/app/views/admin/posts/_show.html.erb
|
401
|
-
- test/fixtures/rails_app/app/views/admin/resources/_sidebar.html.erb
|
402
|
-
- test/fixtures/rails_app/app/views/admin/status/index.html.erb
|
403
|
-
- test/fixtures/rails_app/app/views/admin/templates/_datepicker.html.erb
|
404
|
-
- test/fixtures/rails_app/app/views/admin/watch_dog/index.html.erb
|
405
|
-
- test/fixtures/rails_app/config.ru
|
406
|
-
- test/fixtures/rails_app/config/application.rb
|
407
|
-
- test/fixtures/rails_app/config/boot.rb
|
408
|
-
- test/fixtures/rails_app/config/database.yml
|
409
|
-
- test/fixtures/rails_app/config/deploy.rb
|
410
|
-
- test/fixtures/rails_app/config/environment.rb
|
411
|
-
- test/fixtures/rails_app/config/environments/development.rb
|
412
|
-
- test/fixtures/rails_app/config/environments/production.rb
|
413
|
-
- test/fixtures/rails_app/config/environments/test.rb
|
414
|
-
- test/fixtures/rails_app/config/initializers/backtrace_silencers.rb
|
415
|
-
- test/fixtures/rails_app/config/initializers/dragonfly.rb
|
416
|
-
- test/fixtures/rails_app/config/initializers/inflections.rb
|
417
|
-
- test/fixtures/rails_app/config/initializers/mime_types.rb
|
418
|
-
- test/fixtures/rails_app/config/initializers/secret_token.rb
|
419
|
-
- test/fixtures/rails_app/config/initializers/session_store.rb
|
420
|
-
- test/fixtures/rails_app/config/initializers/typus.rb
|
421
|
-
- test/fixtures/rails_app/config/initializers/typus_resources.rb
|
422
|
-
- test/fixtures/rails_app/config/locales/en.yml
|
423
|
-
- test/fixtures/rails_app/config/mongoid.yml
|
424
|
-
- test/fixtures/rails_app/config/routes.rb
|
425
|
-
- test/fixtures/rails_app/config/typus/README
|
426
|
-
- test/fixtures/rails_app/config/typus/crud_basic.yml
|
427
|
-
- test/fixtures/rails_app/config/typus/crud_basic_roles.yml
|
428
|
-
- test/fixtures/rails_app/config/typus/crud_extended.yml
|
429
|
-
- test/fixtures/rails_app/config/typus/crud_extended_roles.yml
|
430
|
-
- test/fixtures/rails_app/config/typus/has_many.yml
|
431
|
-
- test/fixtures/rails_app/config/typus/has_many_roles.yml
|
432
|
-
- test/fixtures/rails_app/config/typus/has_many_through.yml
|
433
|
-
- test/fixtures/rails_app/config/typus/has_many_through_roles.yml
|
434
|
-
- test/fixtures/rails_app/config/typus/has_one.yml
|
435
|
-
- test/fixtures/rails_app/config/typus/has_one_roles.yml
|
436
|
-
- test/fixtures/rails_app/config/typus/mongo_db.yml
|
437
|
-
- test/fixtures/rails_app/config/typus/mongo_db_roles.yml
|
438
|
-
- test/fixtures/rails_app/config/typus/polymorphic.yml
|
439
|
-
- test/fixtures/rails_app/config/typus/polymorphic_roles.yml
|
440
|
-
- test/fixtures/rails_app/config/typus/resource_roles.yml
|
441
|
-
- test/fixtures/rails_app/config/typus/sti.yml
|
442
|
-
- test/fixtures/rails_app/config/typus/sti_roles.yml
|
443
|
-
- test/fixtures/rails_app/config/typus/typus.yml
|
444
|
-
- test/fixtures/rails_app/config/typus/typus_roles.yml
|
445
|
-
- test/fixtures/rails_app/config/typus/unknown.yml
|
446
|
-
- test/fixtures/rails_app/config/typus/unknown_roles.yml
|
447
|
-
- test/fixtures/rails_app/db/.gitkeep
|
448
|
-
- test/fixtures/rails_app/db/schema.rb
|
449
|
-
- test/fixtures/rails_app/db/seeds.rb
|
450
|
-
- test/fixtures/rails_app/db/seeds/assets/000.jpg
|
451
|
-
- test/fixtures/rails_app/db/seeds/assets/001.jpg
|
452
|
-
- test/fixtures/rails_app/db/seeds/assets/002.jpg
|
453
|
-
- test/fixtures/rails_app/db/seeds/assets/003.jpg
|
454
|
-
- test/fixtures/rails_app/db/seeds/assets/004.jpg
|
455
|
-
- test/fixtures/rails_app/public/404.html
|
456
|
-
- test/fixtures/rails_app/public/422.html
|
457
|
-
- test/fixtures/rails_app/public/500.html
|
458
|
-
- test/fixtures/rails_app/public/favicon.ico
|
459
|
-
- test/fixtures/rails_app/public/images/rails.png
|
460
|
-
- test/fixtures/rails_app/public/robots.txt
|
461
|
-
- test/fixtures/rails_app/public/stylesheets/.gitkeep
|
462
|
-
- test/fixtures/rails_app/script/rails
|
463
|
-
- test/fixtures/rails_app/tmp/.gitkeep
|
464
339
|
- test/lib/support/active_record_test.rb
|
465
340
|
- test/lib/support/fake_user_test.rb
|
466
341
|
- test/lib/support/hash_test.rb
|
@@ -480,6 +355,7 @@ files:
|
|
480
355
|
- test/lib/typus_test.rb
|
481
356
|
- test/test_helper.rb
|
482
357
|
- typus.gemspec
|
358
|
+
has_rdoc: true
|
483
359
|
homepage: http://core.typuscms.com/
|
484
360
|
licenses: []
|
485
361
|
post_install_message:
|
@@ -495,12 +371,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
495
371
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
496
372
|
none: false
|
497
373
|
requirements:
|
498
|
-
- - ! '
|
374
|
+
- - ! '>='
|
499
375
|
- !ruby/object:Gem::Version
|
500
|
-
version:
|
376
|
+
version: '0'
|
501
377
|
requirements: []
|
502
378
|
rubyforge_project: typus
|
503
|
-
rubygems_version: 1.
|
379
|
+
rubygems_version: 1.6.2
|
504
380
|
signing_key:
|
505
381
|
specification_version: 3
|
506
382
|
summary: Effortless backend interface for Ruby on Rails applications. (Admin scaffold
|
@@ -561,134 +437,6 @@ test_files:
|
|
561
437
|
- test/fixtures/config/ordered/002_roles.yml
|
562
438
|
- test/fixtures/config/unordered/app_one_roles.yml
|
563
439
|
- test/fixtures/config/unordered/app_two_roles.yml
|
564
|
-
- test/fixtures/rails_app/.gitignore
|
565
|
-
- test/fixtures/rails_app/Capfile
|
566
|
-
- test/fixtures/rails_app/README
|
567
|
-
- test/fixtures/rails_app/Rakefile
|
568
|
-
- test/fixtures/rails_app/app/controllers/admin/animals_controller.rb
|
569
|
-
- test/fixtures/rails_app/app/controllers/admin/articles_controller.rb
|
570
|
-
- test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
|
571
|
-
- test/fixtures/rails_app/app/controllers/admin/birds_controller.rb
|
572
|
-
- test/fixtures/rails_app/app/controllers/admin/cases_controller.rb
|
573
|
-
- test/fixtures/rails_app/app/controllers/admin/categories_controller.rb
|
574
|
-
- test/fixtures/rails_app/app/controllers/admin/comments_controller.rb
|
575
|
-
- test/fixtures/rails_app/app/controllers/admin/dogs_controller.rb
|
576
|
-
- test/fixtures/rails_app/app/controllers/admin/entries_controller.rb
|
577
|
-
- test/fixtures/rails_app/app/controllers/admin/hits_controller.rb
|
578
|
-
- test/fixtures/rails_app/app/controllers/admin/image_holders_controller.rb
|
579
|
-
- test/fixtures/rails_app/app/controllers/admin/invoices_controller.rb
|
580
|
-
- test/fixtures/rails_app/app/controllers/admin/orders_controller.rb
|
581
|
-
- test/fixtures/rails_app/app/controllers/admin/pages_controller.rb
|
582
|
-
- test/fixtures/rails_app/app/controllers/admin/posts_controller.rb
|
583
|
-
- test/fixtures/rails_app/app/controllers/admin/project_collaborators_controller.rb
|
584
|
-
- test/fixtures/rails_app/app/controllers/admin/projects_controller.rb
|
585
|
-
- test/fixtures/rails_app/app/controllers/admin/status_controller.rb
|
586
|
-
- test/fixtures/rails_app/app/controllers/admin/typus_users_controller.rb
|
587
|
-
- test/fixtures/rails_app/app/controllers/admin/users_controller.rb
|
588
|
-
- test/fixtures/rails_app/app/controllers/admin/views_controller.rb
|
589
|
-
- test/fixtures/rails_app/app/controllers/admin/watch_dog_controller.rb
|
590
|
-
- test/fixtures/rails_app/app/controllers/admin_user.rb
|
591
|
-
- test/fixtures/rails_app/app/controllers/application_controller.rb
|
592
|
-
- test/fixtures/rails_app/app/helpers/application_helper.rb
|
593
|
-
- test/fixtures/rails_app/app/helpers/form_helper.rb
|
594
|
-
- test/fixtures/rails_app/app/models/animal.rb
|
595
|
-
- test/fixtures/rails_app/app/models/article.rb
|
596
|
-
- test/fixtures/rails_app/app/models/asset.rb
|
597
|
-
- test/fixtures/rails_app/app/models/bird.rb
|
598
|
-
- test/fixtures/rails_app/app/models/case.rb
|
599
|
-
- test/fixtures/rails_app/app/models/category.rb
|
600
|
-
- test/fixtures/rails_app/app/models/comment.rb
|
601
|
-
- test/fixtures/rails_app/app/models/delayed/task.rb
|
602
|
-
- test/fixtures/rails_app/app/models/dog.rb
|
603
|
-
- test/fixtures/rails_app/app/models/entry.rb
|
604
|
-
- test/fixtures/rails_app/app/models/hit.rb
|
605
|
-
- test/fixtures/rails_app/app/models/image_holder.rb
|
606
|
-
- test/fixtures/rails_app/app/models/invoice.rb
|
607
|
-
- test/fixtures/rails_app/app/models/order.rb
|
608
|
-
- test/fixtures/rails_app/app/models/page.rb
|
609
|
-
- test/fixtures/rails_app/app/models/post.rb
|
610
|
-
- test/fixtures/rails_app/app/models/project.rb
|
611
|
-
- test/fixtures/rails_app/app/models/project_collaborator.rb
|
612
|
-
- test/fixtures/rails_app/app/models/site.rb
|
613
|
-
- test/fixtures/rails_app/app/models/typus_user.rb
|
614
|
-
- test/fixtures/rails_app/app/models/user.rb
|
615
|
-
- test/fixtures/rails_app/app/models/view.rb
|
616
|
-
- test/fixtures/rails_app/app/views/admin/assets/_index.html.erb
|
617
|
-
- test/fixtures/rails_app/app/views/admin/cases/_index.html.erb
|
618
|
-
- test/fixtures/rails_app/app/views/admin/categories/_index.html.erb
|
619
|
-
- test/fixtures/rails_app/app/views/admin/dashboard/_sidebar.html.erb
|
620
|
-
- test/fixtures/rails_app/app/views/admin/entries/_index.html.erb
|
621
|
-
- test/fixtures/rails_app/app/views/admin/hits/_edit.html.erb
|
622
|
-
- test/fixtures/rails_app/app/views/admin/hits/_index.html.erb
|
623
|
-
- test/fixtures/rails_app/app/views/admin/hits/index.html.erb
|
624
|
-
- test/fixtures/rails_app/app/views/admin/pages/_index.html.erb
|
625
|
-
- test/fixtures/rails_app/app/views/admin/posts/_edit.html.erb
|
626
|
-
- test/fixtures/rails_app/app/views/admin/posts/_index.html.erb
|
627
|
-
- test/fixtures/rails_app/app/views/admin/posts/_new.html.erb
|
628
|
-
- test/fixtures/rails_app/app/views/admin/posts/_show.html.erb
|
629
|
-
- test/fixtures/rails_app/app/views/admin/resources/_sidebar.html.erb
|
630
|
-
- test/fixtures/rails_app/app/views/admin/status/index.html.erb
|
631
|
-
- test/fixtures/rails_app/app/views/admin/templates/_datepicker.html.erb
|
632
|
-
- test/fixtures/rails_app/app/views/admin/watch_dog/index.html.erb
|
633
|
-
- test/fixtures/rails_app/config.ru
|
634
|
-
- test/fixtures/rails_app/config/application.rb
|
635
|
-
- test/fixtures/rails_app/config/boot.rb
|
636
|
-
- test/fixtures/rails_app/config/database.yml
|
637
|
-
- test/fixtures/rails_app/config/deploy.rb
|
638
|
-
- test/fixtures/rails_app/config/environment.rb
|
639
|
-
- test/fixtures/rails_app/config/environments/development.rb
|
640
|
-
- test/fixtures/rails_app/config/environments/production.rb
|
641
|
-
- test/fixtures/rails_app/config/environments/test.rb
|
642
|
-
- test/fixtures/rails_app/config/initializers/backtrace_silencers.rb
|
643
|
-
- test/fixtures/rails_app/config/initializers/dragonfly.rb
|
644
|
-
- test/fixtures/rails_app/config/initializers/inflections.rb
|
645
|
-
- test/fixtures/rails_app/config/initializers/mime_types.rb
|
646
|
-
- test/fixtures/rails_app/config/initializers/secret_token.rb
|
647
|
-
- test/fixtures/rails_app/config/initializers/session_store.rb
|
648
|
-
- test/fixtures/rails_app/config/initializers/typus.rb
|
649
|
-
- test/fixtures/rails_app/config/initializers/typus_resources.rb
|
650
|
-
- test/fixtures/rails_app/config/locales/en.yml
|
651
|
-
- test/fixtures/rails_app/config/mongoid.yml
|
652
|
-
- test/fixtures/rails_app/config/routes.rb
|
653
|
-
- test/fixtures/rails_app/config/typus/README
|
654
|
-
- test/fixtures/rails_app/config/typus/crud_basic.yml
|
655
|
-
- test/fixtures/rails_app/config/typus/crud_basic_roles.yml
|
656
|
-
- test/fixtures/rails_app/config/typus/crud_extended.yml
|
657
|
-
- test/fixtures/rails_app/config/typus/crud_extended_roles.yml
|
658
|
-
- test/fixtures/rails_app/config/typus/has_many.yml
|
659
|
-
- test/fixtures/rails_app/config/typus/has_many_roles.yml
|
660
|
-
- test/fixtures/rails_app/config/typus/has_many_through.yml
|
661
|
-
- test/fixtures/rails_app/config/typus/has_many_through_roles.yml
|
662
|
-
- test/fixtures/rails_app/config/typus/has_one.yml
|
663
|
-
- test/fixtures/rails_app/config/typus/has_one_roles.yml
|
664
|
-
- test/fixtures/rails_app/config/typus/mongo_db.yml
|
665
|
-
- test/fixtures/rails_app/config/typus/mongo_db_roles.yml
|
666
|
-
- test/fixtures/rails_app/config/typus/polymorphic.yml
|
667
|
-
- test/fixtures/rails_app/config/typus/polymorphic_roles.yml
|
668
|
-
- test/fixtures/rails_app/config/typus/resource_roles.yml
|
669
|
-
- test/fixtures/rails_app/config/typus/sti.yml
|
670
|
-
- test/fixtures/rails_app/config/typus/sti_roles.yml
|
671
|
-
- test/fixtures/rails_app/config/typus/typus.yml
|
672
|
-
- test/fixtures/rails_app/config/typus/typus_roles.yml
|
673
|
-
- test/fixtures/rails_app/config/typus/unknown.yml
|
674
|
-
- test/fixtures/rails_app/config/typus/unknown_roles.yml
|
675
|
-
- test/fixtures/rails_app/db/.gitkeep
|
676
|
-
- test/fixtures/rails_app/db/schema.rb
|
677
|
-
- test/fixtures/rails_app/db/seeds.rb
|
678
|
-
- test/fixtures/rails_app/db/seeds/assets/000.jpg
|
679
|
-
- test/fixtures/rails_app/db/seeds/assets/001.jpg
|
680
|
-
- test/fixtures/rails_app/db/seeds/assets/002.jpg
|
681
|
-
- test/fixtures/rails_app/db/seeds/assets/003.jpg
|
682
|
-
- test/fixtures/rails_app/db/seeds/assets/004.jpg
|
683
|
-
- test/fixtures/rails_app/public/404.html
|
684
|
-
- test/fixtures/rails_app/public/422.html
|
685
|
-
- test/fixtures/rails_app/public/500.html
|
686
|
-
- test/fixtures/rails_app/public/favicon.ico
|
687
|
-
- test/fixtures/rails_app/public/images/rails.png
|
688
|
-
- test/fixtures/rails_app/public/robots.txt
|
689
|
-
- test/fixtures/rails_app/public/stylesheets/.gitkeep
|
690
|
-
- test/fixtures/rails_app/script/rails
|
691
|
-
- test/fixtures/rails_app/tmp/.gitkeep
|
692
440
|
- test/lib/support/active_record_test.rb
|
693
441
|
- test/lib/support/fake_user_test.rb
|
694
442
|
- test/lib/support/hash_test.rb
|
@@ -1,256 +0,0 @@
|
|
1
|
-
== Welcome to Rails
|
2
|
-
|
3
|
-
Rails is a web-application framework that includes everything needed to create
|
4
|
-
database-backed web applications according to the Model-View-Control pattern.
|
5
|
-
|
6
|
-
This pattern splits the view (also called the presentation) into "dumb"
|
7
|
-
templates that are primarily responsible for inserting pre-built data in between
|
8
|
-
HTML tags. The model contains the "smart" domain objects (such as Account,
|
9
|
-
Product, Person, Post) that holds all the business logic and knows how to
|
10
|
-
persist themselves to a database. The controller handles the incoming requests
|
11
|
-
(such as Save New Account, Update Product, Show Post) by manipulating the model
|
12
|
-
and directing data to the view.
|
13
|
-
|
14
|
-
In Rails, the model is handled by what's called an object-relational mapping
|
15
|
-
layer entitled Active Record. This layer allows you to present the data from
|
16
|
-
database rows as objects and embellish these data objects with business logic
|
17
|
-
methods. You can read more about Active Record in
|
18
|
-
link:files/vendor/rails/activerecord/README.html.
|
19
|
-
|
20
|
-
The controller and view are handled by the Action Pack, which handles both
|
21
|
-
layers by its two parts: Action View and Action Controller. These two layers
|
22
|
-
are bundled in a single package due to their heavy interdependence. This is
|
23
|
-
unlike the relationship between the Active Record and Action Pack that is much
|
24
|
-
more separate. Each of these packages can be used independently outside of
|
25
|
-
Rails. You can read more about Action Pack in
|
26
|
-
link:files/vendor/rails/actionpack/README.html.
|
27
|
-
|
28
|
-
|
29
|
-
== Getting Started
|
30
|
-
|
31
|
-
1. At the command prompt, create a new Rails application:
|
32
|
-
<tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
|
33
|
-
|
34
|
-
2. Change directory to <tt>myapp</tt> and start the web server:
|
35
|
-
<tt>cd myapp; rails server</tt> (run with --help for options)
|
36
|
-
|
37
|
-
3. Go to http://localhost:3000/ and you'll see:
|
38
|
-
"Welcome aboard: You're riding Ruby on Rails!"
|
39
|
-
|
40
|
-
4. Follow the guidelines to start developing your application. You can find
|
41
|
-
the following resources handy:
|
42
|
-
|
43
|
-
* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
|
44
|
-
* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
|
45
|
-
|
46
|
-
|
47
|
-
== Debugging Rails
|
48
|
-
|
49
|
-
Sometimes your application goes wrong. Fortunately there are a lot of tools that
|
50
|
-
will help you debug it and get it back on the rails.
|
51
|
-
|
52
|
-
First area to check is the application log files. Have "tail -f" commands
|
53
|
-
running on the server.log and development.log. Rails will automatically display
|
54
|
-
debugging and runtime information to these files. Debugging info will also be
|
55
|
-
shown in the browser on requests from 127.0.0.1.
|
56
|
-
|
57
|
-
You can also log your own messages directly into the log file from your code
|
58
|
-
using the Ruby logger class from inside your controllers. Example:
|
59
|
-
|
60
|
-
class WeblogController < ActionController::Base
|
61
|
-
def destroy
|
62
|
-
@weblog = Weblog.find(params[:id])
|
63
|
-
@weblog.destroy
|
64
|
-
logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
The result will be a message in your log file along the lines of:
|
69
|
-
|
70
|
-
Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
|
71
|
-
|
72
|
-
More information on how to use the logger is at http://www.ruby-doc.org/core/
|
73
|
-
|
74
|
-
Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
|
75
|
-
several books available online as well:
|
76
|
-
|
77
|
-
* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
|
78
|
-
* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
|
79
|
-
|
80
|
-
These two books will bring you up to speed on the Ruby language and also on
|
81
|
-
programming in general.
|
82
|
-
|
83
|
-
|
84
|
-
== Debugger
|
85
|
-
|
86
|
-
Debugger support is available through the debugger command when you start your
|
87
|
-
Mongrel or WEBrick server with --debugger. This means that you can break out of
|
88
|
-
execution at any point in the code, investigate and change the model, and then,
|
89
|
-
resume execution! You need to install ruby-debug to run the server in debugging
|
90
|
-
mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
|
91
|
-
|
92
|
-
class WeblogController < ActionController::Base
|
93
|
-
def index
|
94
|
-
@posts = Post.find(:all)
|
95
|
-
debugger
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
So the controller will accept the action, run the first line, then present you
|
100
|
-
with a IRB prompt in the server window. Here you can do things like:
|
101
|
-
|
102
|
-
>> @posts.inspect
|
103
|
-
=> "[#<Post:0x14a6be8
|
104
|
-
@attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
|
105
|
-
#<Post:0x14a6620
|
106
|
-
@attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
|
107
|
-
>> @posts.first.title = "hello from a debugger"
|
108
|
-
=> "hello from a debugger"
|
109
|
-
|
110
|
-
...and even better, you can examine how your runtime objects actually work:
|
111
|
-
|
112
|
-
>> f = @posts.first
|
113
|
-
=> #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
|
114
|
-
>> f.
|
115
|
-
Display all 152 possibilities? (y or n)
|
116
|
-
|
117
|
-
Finally, when you're ready to resume execution, you can enter "cont".
|
118
|
-
|
119
|
-
|
120
|
-
== Console
|
121
|
-
|
122
|
-
The console is a Ruby shell, which allows you to interact with your
|
123
|
-
application's domain model. Here you'll have all parts of the application
|
124
|
-
configured, just like it is when the application is running. You can inspect
|
125
|
-
domain models, change values, and save to the database. Starting the script
|
126
|
-
without arguments will launch it in the development environment.
|
127
|
-
|
128
|
-
To start the console, run <tt>rails console</tt> from the application
|
129
|
-
directory.
|
130
|
-
|
131
|
-
Options:
|
132
|
-
|
133
|
-
* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
|
134
|
-
made to the database.
|
135
|
-
* Passing an environment name as an argument will load the corresponding
|
136
|
-
environment. Example: <tt>rails console production</tt>.
|
137
|
-
|
138
|
-
To reload your controllers and models after launching the console run
|
139
|
-
<tt>reload!</tt>
|
140
|
-
|
141
|
-
More information about irb can be found at:
|
142
|
-
link:http://www.rubycentral.com/pickaxe/irb.html
|
143
|
-
|
144
|
-
|
145
|
-
== dbconsole
|
146
|
-
|
147
|
-
You can go to the command line of your database directly through <tt>rails
|
148
|
-
dbconsole</tt>. You would be connected to the database with the credentials
|
149
|
-
defined in database.yml. Starting the script without arguments will connect you
|
150
|
-
to the development database. Passing an argument will connect you to a different
|
151
|
-
database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
|
152
|
-
PostgreSQL and SQLite 3.
|
153
|
-
|
154
|
-
== Description of Contents
|
155
|
-
|
156
|
-
The default directory structure of a generated Ruby on Rails application:
|
157
|
-
|
158
|
-
|-- app
|
159
|
-
| |-- controllers
|
160
|
-
| |-- helpers
|
161
|
-
| |-- mailers
|
162
|
-
| |-- models
|
163
|
-
| `-- views
|
164
|
-
| `-- layouts
|
165
|
-
|-- config
|
166
|
-
| |-- environments
|
167
|
-
| |-- initializers
|
168
|
-
| `-- locales
|
169
|
-
|-- db
|
170
|
-
|-- doc
|
171
|
-
|-- lib
|
172
|
-
| `-- tasks
|
173
|
-
|-- log
|
174
|
-
|-- public
|
175
|
-
| |-- images
|
176
|
-
| |-- javascripts
|
177
|
-
| `-- stylesheets
|
178
|
-
|-- script
|
179
|
-
|-- test
|
180
|
-
| |-- fixtures
|
181
|
-
| |-- functional
|
182
|
-
| |-- integration
|
183
|
-
| |-- performance
|
184
|
-
| `-- unit
|
185
|
-
|-- tmp
|
186
|
-
| |-- cache
|
187
|
-
| |-- pids
|
188
|
-
| |-- sessions
|
189
|
-
| `-- sockets
|
190
|
-
`-- vendor
|
191
|
-
`-- plugins
|
192
|
-
|
193
|
-
app
|
194
|
-
Holds all the code that's specific to this particular application.
|
195
|
-
|
196
|
-
app/controllers
|
197
|
-
Holds controllers that should be named like weblogs_controller.rb for
|
198
|
-
automated URL mapping. All controllers should descend from
|
199
|
-
ApplicationController which itself descends from ActionController::Base.
|
200
|
-
|
201
|
-
app/models
|
202
|
-
Holds models that should be named like post.rb. Models descend from
|
203
|
-
ActiveRecord::Base by default.
|
204
|
-
|
205
|
-
app/views
|
206
|
-
Holds the template files for the view that should be named like
|
207
|
-
weblogs/index.html.erb for the WeblogsController#index action. All views use
|
208
|
-
eRuby syntax by default.
|
209
|
-
|
210
|
-
app/views/layouts
|
211
|
-
Holds the template files for layouts to be used with views. This models the
|
212
|
-
common header/footer method of wrapping views. In your views, define a layout
|
213
|
-
using the <tt>layout :default</tt> and create a file named default.html.erb.
|
214
|
-
Inside default.html.erb, call <% yield %> to render the view using this
|
215
|
-
layout.
|
216
|
-
|
217
|
-
app/helpers
|
218
|
-
Holds view helpers that should be named like weblogs_helper.rb. These are
|
219
|
-
generated for you automatically when using generators for controllers.
|
220
|
-
Helpers can be used to wrap functionality for your views into methods.
|
221
|
-
|
222
|
-
config
|
223
|
-
Configuration files for the Rails environment, the routing map, the database,
|
224
|
-
and other dependencies.
|
225
|
-
|
226
|
-
db
|
227
|
-
Contains the database schema in schema.rb. db/migrate contains all the
|
228
|
-
sequence of Migrations for your schema.
|
229
|
-
|
230
|
-
doc
|
231
|
-
This directory is where your application documentation will be stored when
|
232
|
-
generated using <tt>rake doc:app</tt>
|
233
|
-
|
234
|
-
lib
|
235
|
-
Application specific libraries. Basically, any kind of custom code that
|
236
|
-
doesn't belong under controllers, models, or helpers. This directory is in
|
237
|
-
the load path.
|
238
|
-
|
239
|
-
public
|
240
|
-
The directory available for the web server. Contains subdirectories for
|
241
|
-
images, stylesheets, and javascripts. Also contains the dispatchers and the
|
242
|
-
default HTML files. This should be set as the DOCUMENT_ROOT of your web
|
243
|
-
server.
|
244
|
-
|
245
|
-
script
|
246
|
-
Helper scripts for automation and generation.
|
247
|
-
|
248
|
-
test
|
249
|
-
Unit and functional tests along with fixtures. When using the rails generate
|
250
|
-
command, template test files will be generated for you and placed in this
|
251
|
-
directory.
|
252
|
-
|
253
|
-
vendor
|
254
|
-
External libraries that the application depends on. Also includes the plugins
|
255
|
-
subdirectory. If the app has frozen rails, those gems also go here, under
|
256
|
-
vendor/rails/. This directory is in the load path.
|