typus 1.0.0.pre8 → 1.0.0.pre9
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.
- data/CHANGELOG +4 -6
- data/Gemfile +16 -13
- data/Gemfile.lock +26 -2
- data/Rakefile +2 -3
- data/app/controllers/admin/base_controller.rb +3 -5
- data/app/controllers/admin/resources_controller.rb +24 -26
- data/app/helpers/admin/base_helper.rb +14 -22
- data/app/helpers/admin/dashboard_helper.rb +2 -5
- data/app/helpers/admin/filters_helper.rb +6 -8
- data/app/helpers/admin/form_helper.rb +3 -9
- data/app/helpers/admin/preview_helper.rb +4 -6
- data/app/helpers/admin/relationships_helper.rb +9 -11
- data/app/helpers/admin/resources_helper.rb +6 -24
- data/app/helpers/admin/search_helper.rb +1 -1
- data/app/helpers/admin/sidebar_helper.rb +12 -15
- data/app/helpers/admin/table_helper.rb +13 -13
- data/app/views/admin/dashboard/show.html.erb +1 -1
- data/app/views/admin/helpers/_apps.html.erb +4 -3
- data/app/views/admin/helpers/_header.html.erb +2 -2
- data/app/views/admin/helpers/dashboard/_applications.html.erb +3 -3
- data/app/views/admin/helpers/dashboard/_resources.html.erb +17 -13
- data/app/views/admin/helpers/filters/_filters.html.erb +9 -27
- data/app/views/admin/helpers/resources/_pagination.html.erb +8 -9
- data/app/views/admin/helpers/search/_search.html.erb +1 -1
- data/app/views/admin/mailer/reset_password_link.text.erb +3 -0
- data/app/views/admin/resources/_form.html.erb +4 -4
- data/app/views/admin/resources/edit.html.erb +2 -3
- data/app/views/admin/resources/index.html.erb +15 -13
- data/app/views/admin/resources/new.html.erb +2 -2
- data/app/views/admin/resources/show.html.erb +1 -2
- data/app/views/admin/templates/_boolean.html.erb +1 -1
- data/app/views/admin/templates/_has_many.html.erb +2 -4
- data/app/views/admin/templates/_has_n.html.erb +1 -1
- data/app/views/admin/templates/_selector.html.erb +0 -1
- data/app/views/admin/templates/_string.html.erb +1 -1
- data/app/views/layouts/admin/session.html.erb +1 -1
- data/config/available_locales/ca.yml +3 -5
- data/config/available_locales/de.yml +2 -4
- data/config/available_locales/es.yml +2 -4
- data/config/available_locales/fr.yml +40 -39
- data/config/available_locales/fr_models.yml +2 -2
- data/config/available_locales/hu.yml +3 -5
- data/config/available_locales/it.yml +0 -4
- data/config/available_locales/language.yml.template +2 -4
- data/config/available_locales/pt-BR.yml +2 -4
- data/config/available_locales/ru.yml +2 -4
- data/config/routes.rb +1 -0
- data/lib/generators/templates/config/initializers/typus.rb +5 -5
- data/lib/generators/templates/config/initializers/typus_authentication.rb +5 -5
- data/lib/generators/templates/config/initializers/typus_resources.rb +7 -7
- data/lib/generators/templates/config/typus/README +11 -13
- data/lib/generators/templates/controller.rb +0 -2
- data/lib/generators/templates/functional_test.rb +4 -15
- data/lib/generators/typus/migration_generator.rb +0 -1
- data/lib/support/active_record.rb +18 -9
- data/lib/support/fake_user.rb +42 -0
- data/lib/support/object.rb +1 -0
- data/lib/support/string.rb +0 -32
- data/lib/tasks/typus.rake +0 -8
- data/lib/typus.rb +34 -18
- data/lib/typus/authentication/base.rb +26 -0
- data/lib/typus/authentication/http_basic.rb +22 -0
- data/lib/typus/authentication/none.rb +19 -0
- data/lib/typus/authentication/session.rb +190 -0
- data/lib/typus/format.rb +12 -19
- data/lib/typus/orm/active_record.rb +13 -51
- data/lib/typus/resources.rb +0 -9
- data/lib/typus/version.rb +1 -1
- data/test/factories.rb +43 -0
- data/test/fixtures/rails_app/app/controllers/application_controller.rb +0 -1
- data/test/fixtures/rails_app/app/models/page.rb +0 -4
- data/test/fixtures/rails_app/config/application.rb +6 -3
- data/test/fixtures/rails_app/config/database.yml +12 -20
- data/test/fixtures/rails_app/config/typus/application.yml +4 -8
- data/test/fixtures/rails_app/db/test.sqlite3 +0 -0
- data/test/fixtures/rails_app/log/test.log +227115 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012213057.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012213132.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012213234.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012213506.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215057.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215217.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215415.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215443.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215509.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215528.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215551.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215615.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215640.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215714.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215744.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215814.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215836.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012215906.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012220659.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012221043.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012221258.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012222558.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012222752.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012222848.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012223433.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012223535.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012224003.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012224052.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012224109.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012224139.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012224205.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012224243.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101012225119.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063215.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063300.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063352.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063427.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063448.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063530.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063559.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063646.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063737.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063822.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063837.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063919.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063939.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013063952.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013064220.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013064253.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013064318.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013064404.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013064452.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013064536.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013064652.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013064845.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013065023.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013065137.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013065713.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013065954.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070057.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070116.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070156.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070349.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070429.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070448.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070514.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070709.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070745.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070809.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070905.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013070955.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013071116.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013071209.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013071335.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013071632.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013071643.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013071735.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013071749.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013072030.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013072050.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013072108.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013072713.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013072751.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013072912.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101013074546.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101018180512.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101018183359.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101018183608.csv +2 -0
- data/test/fixtures/rails_app/tmp/export-posts-20101018183759.csv +2 -0
- data/test/functional/admin/account_controller_test.rb +1 -1
- data/test/functional/admin/{resources_controller_assets_relationships.rb → assets_controller_test.rb} +12 -16
- data/test/functional/admin/categories_controller_test.rb +62 -0
- data/test/functional/admin/{resources_controller_comments_toggle_test.rb → comments_controller_test.rb} +0 -0
- data/test/functional/admin/dashboard_controller_test.rb +34 -2
- data/test/functional/admin/posts_controller_test.rb +548 -0
- data/test/functional/admin/session_controller_test.rb +2 -2
- data/test/functional/admin/{resources_controller_tableless_resource_test.rb → status_controller_test.rb} +0 -0
- data/test/functional/admin/{resources_controller_typus_users_test.rb → typus_users_controller_test.rb} +2 -2
- data/test/helpers/admin/base_helper_test.rb +35 -37
- data/test/helpers/admin/dashboard_helper_test.rb +4 -8
- data/test/helpers/admin/form_helper_test.rb +9 -34
- data/test/helpers/admin/resources_helper_test.rb +28 -16
- data/test/helpers/admin/sidebar_helper_test.rb +14 -27
- data/test/helpers/admin/table_helper_test.rb +24 -68
- data/test/integration/login_test.rb +13 -0
- data/test/integration_test_helper.rb +21 -0
- data/test/lib/support/active_record_test.rb +72 -21
- data/test/lib/support/array_test.rb +2 -6
- data/test/lib/support/string_test.rb +21 -30
- data/test/lib/typus/active_record_test.rb +162 -100
- data/test/lib/typus/resource_test.rb +2 -3
- data/test/lib/typus_test.rb +25 -22
- data/test/test_helper.rb +4 -17
- data/test/unit/admin/mailer_test.rb +2 -2
- data/test/unit/typus_user_roles_test.rb +23 -23
- data/test/unit/typus_user_test.rb +30 -24
- data/typus.gemspec +0 -1
- metadata +111 -60
- data/app/models/admin/fake_user.rb +0 -46
- data/lib/generators/templates/model.yml +0 -10
- data/lib/typus/authentication.rb +0 -241
- data/lib/vendor/paginator.rb +0 -143
- data/test/factories/assets.rb +0 -5
- data/test/factories/categories.rb +0 -3
- data/test/factories/comments.rb +0 -6
- data/test/factories/pages.rb +0 -5
- data/test/factories/pictures.rb +0 -7
- data/test/factories/posts.rb +0 -6
- data/test/factories/typus_users.rb +0 -8
- data/test/fixtures/rails_app/README +0 -244
- data/test/fixtures/rails_app/app/helpers/application_helper.rb +0 -2
- data/test/fixtures/rails_app/app/views/layouts/application.html.erb +0 -14
- data/test/fixtures/rails_app/config/environments/development.rb +0 -19
- data/test/fixtures/rails_app/config/environments/production.rb +0 -42
- data/test/fixtures/rails_app/config/initializers/acts_as_list.rb +0 -258
- data/test/fixtures/rails_app/config/initializers/acts_as_tree.rb +0 -98
- data/test/fixtures/rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/test/fixtures/rails_app/config/initializers/inflections.rb +0 -10
- data/test/fixtures/rails_app/config/initializers/mime_types.rb +0 -5
- data/test/fixtures/rails_app/config/locales/en.yml +0 -5
- data/test/fixtures/rails_app/db/seeds.rb +0 -7
- 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/index.html +0 -279
- data/test/fixtures/rails_app/public/javascripts/application.js +0 -2
- data/test/fixtures/rails_app/public/javascripts/controls.js +0 -965
- data/test/fixtures/rails_app/public/javascripts/dragdrop.js +0 -974
- data/test/fixtures/rails_app/public/javascripts/effects.js +0 -1123
- data/test/fixtures/rails_app/public/javascripts/prototype.js +0 -4874
- data/test/fixtures/rails_app/public/javascripts/rails.js +0 -118
- data/test/fixtures/rails_app/public/robots.txt +0 -5
- data/test/fixtures/rails_app/script/rails +0 -9
- data/test/functional/admin/dashboard_controller_http_basic_test.rb +0 -24
- data/test/functional/admin/dashboard_controller_none_test.rb +0 -18
- data/test/functional/admin/resources_controller_categories_before_test.rb +0 -10
- data/test/functional/admin/resources_controller_categories_lists_test.rb +0 -44
- data/test/functional/admin/resources_controller_categories_views_test.rb +0 -10
- data/test/functional/admin/resources_controller_posts_before_test.rb +0 -10
- data/test/functional/admin/resources_controller_posts_crud_custom_test.rb +0 -27
- data/test/functional/admin/resources_controller_posts_crud_test.rb +0 -44
- data/test/functional/admin/resources_controller_posts_formats_test.rb +0 -39
- data/test/functional/admin/resources_controller_posts_forms_test.rb +0 -58
- data/test/functional/admin/resources_controller_posts_permissions_test.rb +0 -100
- data/test/functional/admin/resources_controller_posts_relationships_test.rb +0 -91
- data/test/functional/admin/resources_controller_posts_roles.rb +0 -52
- data/test/functional/admin/resources_controller_posts_views_test.rb +0 -143
- data/test/lib/vendor/paginator_test.rb +0 -141
- data/typus-1.0.0.pre7.gem +0 -0
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
module ActiveRecord
|
|
2
|
-
module Acts
|
|
3
|
-
module Tree
|
|
4
|
-
def self.included(base)
|
|
5
|
-
base.extend(ClassMethods)
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
# Specify this +acts_as+ extension if you want to model a tree structure by providing a parent association and a children
|
|
9
|
-
# association. This requires that you have a foreign key column, which by default is called +parent_id+.
|
|
10
|
-
#
|
|
11
|
-
# class Category < ActiveRecord::Base
|
|
12
|
-
# acts_as_tree :order => "name"
|
|
13
|
-
# end
|
|
14
|
-
#
|
|
15
|
-
# Example:
|
|
16
|
-
# root
|
|
17
|
-
# \_ child1
|
|
18
|
-
# \_ subchild1
|
|
19
|
-
# \_ subchild2
|
|
20
|
-
#
|
|
21
|
-
# root = Category.create("name" => "root")
|
|
22
|
-
# child1 = root.children.create("name" => "child1")
|
|
23
|
-
# subchild1 = child1.children.create("name" => "subchild1")
|
|
24
|
-
#
|
|
25
|
-
# root.parent # => nil
|
|
26
|
-
# child1.parent # => root
|
|
27
|
-
# root.children # => [child1]
|
|
28
|
-
# root.children.first.children.first # => subchild1
|
|
29
|
-
#
|
|
30
|
-
# In addition to the parent and children associations, the following instance methods are added to the class
|
|
31
|
-
# after calling <tt>acts_as_tree</tt>:
|
|
32
|
-
# * <tt>siblings</tt> - Returns all the children of the parent, excluding the current node (<tt>[subchild2]</tt> when called on <tt>subchild1</tt>)
|
|
33
|
-
# * <tt>self_and_siblings</tt> - Returns all the children of the parent, including the current node (<tt>[subchild1, subchild2]</tt> when called on <tt>subchild1</tt>)
|
|
34
|
-
# * <tt>ancestors</tt> - Returns all the ancestors of the current node (<tt>[child1, root]</tt> when called on <tt>subchild2</tt>)
|
|
35
|
-
# * <tt>root</tt> - Returns the root of the current node (<tt>root</tt> when called on <tt>subchild2</tt>)
|
|
36
|
-
module ClassMethods
|
|
37
|
-
# Configuration options are:
|
|
38
|
-
#
|
|
39
|
-
# * <tt>foreign_key</tt> - specifies the column name to use for tracking of the tree (default: +parent_id+)
|
|
40
|
-
# * <tt>order</tt> - makes it possible to sort the children according to this SQL snippet.
|
|
41
|
-
# * <tt>counter_cache</tt> - keeps a count in a +children_count+ column if set to +true+ (default: +false+).
|
|
42
|
-
def acts_as_tree(options = {})
|
|
43
|
-
configuration = { :foreign_key => "parent_id", :order => nil, :counter_cache => nil }
|
|
44
|
-
configuration.update(options) if options.is_a?(Hash)
|
|
45
|
-
|
|
46
|
-
belongs_to :parent, :class_name => name, :foreign_key => configuration[:foreign_key], :counter_cache => configuration[:counter_cache]
|
|
47
|
-
has_many :children, :class_name => name, :foreign_key => configuration[:foreign_key], :order => configuration[:order], :dependent => :destroy
|
|
48
|
-
|
|
49
|
-
class_eval <<-EOV
|
|
50
|
-
include ActiveRecord::Acts::Tree::InstanceMethods
|
|
51
|
-
|
|
52
|
-
def self.roots
|
|
53
|
-
find(:all, :conditions => "#{configuration[:foreign_key]} IS NULL", :order => #{configuration[:order].nil? ? "nil" : %Q{"#{configuration[:order]}"}})
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def self.root
|
|
57
|
-
find(:first, :conditions => "#{configuration[:foreign_key]} IS NULL", :order => #{configuration[:order].nil? ? "nil" : %Q{"#{configuration[:order]}"}})
|
|
58
|
-
end
|
|
59
|
-
EOV
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
module InstanceMethods
|
|
64
|
-
# Returns list of ancestors, starting from parent until root.
|
|
65
|
-
#
|
|
66
|
-
# subchild1.ancestors # => [child1, root]
|
|
67
|
-
def ancestors
|
|
68
|
-
node, nodes = self, []
|
|
69
|
-
nodes << node = node.parent while node.parent
|
|
70
|
-
nodes
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
# Returns the root node of the tree.
|
|
74
|
-
def root
|
|
75
|
-
node = self
|
|
76
|
-
node = node.parent while node.parent
|
|
77
|
-
node
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
# Returns all siblings of the current node.
|
|
81
|
-
#
|
|
82
|
-
# subchild1.siblings # => [subchild2]
|
|
83
|
-
def siblings
|
|
84
|
-
self_and_siblings - [self]
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# Returns all siblings and a reference to the current node.
|
|
88
|
-
#
|
|
89
|
-
# subchild1.self_and_siblings # => [subchild1, subchild2]
|
|
90
|
-
def self_and_siblings
|
|
91
|
-
parent ? parent.children : self.class.roots
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
ActiveRecord::Base.send :include, ActiveRecord::Acts::Tree
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
|
2
|
-
|
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
|
5
|
-
|
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
|
2
|
-
|
|
3
|
-
# Add new inflection rules using the following format
|
|
4
|
-
# (all these examples are active by default):
|
|
5
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
|
8
|
-
# inflect.irregular 'person', 'people'
|
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
|
10
|
-
# end
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
|
2
|
-
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
|
3
|
-
#
|
|
4
|
-
# Examples:
|
|
5
|
-
#
|
|
6
|
-
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
|
|
7
|
-
# Mayor.create(:name => 'Daley', :city => cities.first)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
|
5
|
-
<style type="text/css">
|
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
-
div.dialog {
|
|
8
|
-
width: 25em;
|
|
9
|
-
padding: 0 4em;
|
|
10
|
-
margin: 4em auto 0 auto;
|
|
11
|
-
border: 1px solid #ccc;
|
|
12
|
-
border-right-color: #999;
|
|
13
|
-
border-bottom-color: #999;
|
|
14
|
-
}
|
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<!-- This file lives in public/404.html -->
|
|
21
|
-
<div class="dialog">
|
|
22
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
|
23
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
|
24
|
-
</div>
|
|
25
|
-
</body>
|
|
26
|
-
</html>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
|
5
|
-
<style type="text/css">
|
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
-
div.dialog {
|
|
8
|
-
width: 25em;
|
|
9
|
-
padding: 0 4em;
|
|
10
|
-
margin: 4em auto 0 auto;
|
|
11
|
-
border: 1px solid #ccc;
|
|
12
|
-
border-right-color: #999;
|
|
13
|
-
border-bottom-color: #999;
|
|
14
|
-
}
|
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<!-- This file lives in public/422.html -->
|
|
21
|
-
<div class="dialog">
|
|
22
|
-
<h1>The change you wanted was rejected.</h1>
|
|
23
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
|
24
|
-
</div>
|
|
25
|
-
</body>
|
|
26
|
-
</html>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
|
5
|
-
<style type="text/css">
|
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
7
|
-
div.dialog {
|
|
8
|
-
width: 25em;
|
|
9
|
-
padding: 0 4em;
|
|
10
|
-
margin: 4em auto 0 auto;
|
|
11
|
-
border: 1px solid #ccc;
|
|
12
|
-
border-right-color: #999;
|
|
13
|
-
border-bottom-color: #999;
|
|
14
|
-
}
|
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<!-- This file lives in public/500.html -->
|
|
21
|
-
<div class="dialog">
|
|
22
|
-
<h1>We're sorry, but something went wrong.</h1>
|
|
23
|
-
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
|
24
|
-
</div>
|
|
25
|
-
</body>
|
|
26
|
-
</html>
|
|
File without changes
|
|
Binary file
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>Ruby on Rails: Welcome aboard</title>
|
|
5
|
-
<style type="text/css" media="screen">
|
|
6
|
-
body {
|
|
7
|
-
margin: 0;
|
|
8
|
-
margin-bottom: 25px;
|
|
9
|
-
padding: 0;
|
|
10
|
-
background-color: #f0f0f0;
|
|
11
|
-
font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
|
|
12
|
-
font-size: 13px;
|
|
13
|
-
color: #333;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
h1 {
|
|
17
|
-
font-size: 28px;
|
|
18
|
-
color: #000;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
a {color: #03c}
|
|
22
|
-
a:hover {
|
|
23
|
-
background-color: #03c;
|
|
24
|
-
color: white;
|
|
25
|
-
text-decoration: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
#page {
|
|
30
|
-
background-color: #f0f0f0;
|
|
31
|
-
width: 750px;
|
|
32
|
-
margin: 0;
|
|
33
|
-
margin-left: auto;
|
|
34
|
-
margin-right: auto;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
#content {
|
|
38
|
-
float: left;
|
|
39
|
-
background-color: white;
|
|
40
|
-
border: 3px solid #aaa;
|
|
41
|
-
border-top: none;
|
|
42
|
-
padding: 25px;
|
|
43
|
-
width: 500px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
#sidebar {
|
|
47
|
-
float: right;
|
|
48
|
-
width: 175px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
#footer {
|
|
52
|
-
clear: both;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
#header, #about, #getting-started {
|
|
57
|
-
padding-left: 75px;
|
|
58
|
-
padding-right: 30px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
#header {
|
|
63
|
-
background-image: url("images/rails.png");
|
|
64
|
-
background-repeat: no-repeat;
|
|
65
|
-
background-position: top left;
|
|
66
|
-
height: 64px;
|
|
67
|
-
}
|
|
68
|
-
#header h1, #header h2 {margin: 0}
|
|
69
|
-
#header h2 {
|
|
70
|
-
color: #888;
|
|
71
|
-
font-weight: normal;
|
|
72
|
-
font-size: 16px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
#about h3 {
|
|
77
|
-
margin: 0;
|
|
78
|
-
margin-bottom: 10px;
|
|
79
|
-
font-size: 14px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
#about-content {
|
|
83
|
-
background-color: #ffd;
|
|
84
|
-
border: 1px solid #fc0;
|
|
85
|
-
margin-left: -55px;
|
|
86
|
-
margin-right: -10px;
|
|
87
|
-
}
|
|
88
|
-
#about-content table {
|
|
89
|
-
margin-top: 10px;
|
|
90
|
-
margin-bottom: 10px;
|
|
91
|
-
font-size: 11px;
|
|
92
|
-
border-collapse: collapse;
|
|
93
|
-
}
|
|
94
|
-
#about-content td {
|
|
95
|
-
padding: 10px;
|
|
96
|
-
padding-top: 3px;
|
|
97
|
-
padding-bottom: 3px;
|
|
98
|
-
}
|
|
99
|
-
#about-content td.name {color: #555}
|
|
100
|
-
#about-content td.value {color: #000}
|
|
101
|
-
|
|
102
|
-
#about-content ul {
|
|
103
|
-
padding: 0;
|
|
104
|
-
list-style-type: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
#about-content.failure {
|
|
108
|
-
background-color: #fcc;
|
|
109
|
-
border: 1px solid #f00;
|
|
110
|
-
}
|
|
111
|
-
#about-content.failure p {
|
|
112
|
-
margin: 0;
|
|
113
|
-
padding: 10px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
#getting-started {
|
|
118
|
-
border-top: 1px solid #ccc;
|
|
119
|
-
margin-top: 25px;
|
|
120
|
-
padding-top: 15px;
|
|
121
|
-
}
|
|
122
|
-
#getting-started h1 {
|
|
123
|
-
margin: 0;
|
|
124
|
-
font-size: 20px;
|
|
125
|
-
}
|
|
126
|
-
#getting-started h2 {
|
|
127
|
-
margin: 0;
|
|
128
|
-
font-size: 14px;
|
|
129
|
-
font-weight: normal;
|
|
130
|
-
color: #333;
|
|
131
|
-
margin-bottom: 25px;
|
|
132
|
-
}
|
|
133
|
-
#getting-started ol {
|
|
134
|
-
margin-left: 0;
|
|
135
|
-
padding-left: 0;
|
|
136
|
-
}
|
|
137
|
-
#getting-started li {
|
|
138
|
-
font-size: 18px;
|
|
139
|
-
color: #888;
|
|
140
|
-
margin-bottom: 25px;
|
|
141
|
-
}
|
|
142
|
-
#getting-started li h2 {
|
|
143
|
-
margin: 0;
|
|
144
|
-
font-weight: normal;
|
|
145
|
-
font-size: 18px;
|
|
146
|
-
color: #333;
|
|
147
|
-
}
|
|
148
|
-
#getting-started li p {
|
|
149
|
-
color: #555;
|
|
150
|
-
font-size: 13px;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
#search {
|
|
155
|
-
margin: 0;
|
|
156
|
-
padding-top: 10px;
|
|
157
|
-
padding-bottom: 10px;
|
|
158
|
-
font-size: 11px;
|
|
159
|
-
}
|
|
160
|
-
#search input {
|
|
161
|
-
font-size: 11px;
|
|
162
|
-
margin: 2px;
|
|
163
|
-
}
|
|
164
|
-
#search-text {width: 170px}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
#sidebar ul {
|
|
168
|
-
margin-left: 0;
|
|
169
|
-
padding-left: 0;
|
|
170
|
-
}
|
|
171
|
-
#sidebar ul h3 {
|
|
172
|
-
margin-top: 25px;
|
|
173
|
-
font-size: 16px;
|
|
174
|
-
padding-bottom: 10px;
|
|
175
|
-
border-bottom: 1px solid #ccc;
|
|
176
|
-
}
|
|
177
|
-
#sidebar li {
|
|
178
|
-
list-style-type: none;
|
|
179
|
-
}
|
|
180
|
-
#sidebar ul.links li {
|
|
181
|
-
margin-bottom: 5px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
</style>
|
|
185
|
-
<script type="text/javascript">
|
|
186
|
-
function about() {
|
|
187
|
-
info = document.getElementById('about-content');
|
|
188
|
-
if (window.XMLHttpRequest)
|
|
189
|
-
{ xhr = new XMLHttpRequest(); }
|
|
190
|
-
else
|
|
191
|
-
{ xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
|
|
192
|
-
xhr.open("GET","rails/info/properties",false);
|
|
193
|
-
xhr.send("");
|
|
194
|
-
info.innerHTML = xhr.responseText;
|
|
195
|
-
info.style.display = 'block'
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function prepend() {
|
|
199
|
-
search = document.getElementById('search-text');
|
|
200
|
-
text = search.value;
|
|
201
|
-
search.value = 'site:rubyonrails.org ' + text;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
window.onload = function() {
|
|
205
|
-
document.getElementById('search-text').value = '';
|
|
206
|
-
}
|
|
207
|
-
</script>
|
|
208
|
-
</head>
|
|
209
|
-
<body>
|
|
210
|
-
<div id="page">
|
|
211
|
-
<div id="sidebar">
|
|
212
|
-
<ul id="sidebar-items">
|
|
213
|
-
<li>
|
|
214
|
-
<form id="search" action="http://www.google.com/search" method="get" onSubmit="prepend();">
|
|
215
|
-
<input type="hidden" name="hl" value="en" />
|
|
216
|
-
<input type="text" id="search-text" name="q" value="site:rubyonrails.org " />
|
|
217
|
-
<input type="submit" value="Search" /> the Rails site
|
|
218
|
-
</form>
|
|
219
|
-
</li>
|
|
220
|
-
|
|
221
|
-
<li>
|
|
222
|
-
<h3>Join the community</h3>
|
|
223
|
-
<ul class="links">
|
|
224
|
-
<li><a href="http://www.rubyonrails.org/">Ruby on Rails</a></li>
|
|
225
|
-
<li><a href="http://weblog.rubyonrails.org/">Official weblog</a></li>
|
|
226
|
-
<li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
|
|
227
|
-
</ul>
|
|
228
|
-
</li>
|
|
229
|
-
|
|
230
|
-
<li>
|
|
231
|
-
<h3>Browse the documentation</h3>
|
|
232
|
-
<ul class="links">
|
|
233
|
-
<li><a href="http://api.rubyonrails.org/">Rails API</a></li>
|
|
234
|
-
<li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
|
|
235
|
-
<li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
|
|
236
|
-
<li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
|
|
237
|
-
</ul>
|
|
238
|
-
</li>
|
|
239
|
-
</ul>
|
|
240
|
-
</div>
|
|
241
|
-
|
|
242
|
-
<div id="content">
|
|
243
|
-
<div id="header">
|
|
244
|
-
<h1>Welcome aboard</h1>
|
|
245
|
-
<h2>You’re riding Ruby on Rails!</h2>
|
|
246
|
-
</div>
|
|
247
|
-
|
|
248
|
-
<div id="about">
|
|
249
|
-
<h3><a href="rails/info/properties" onclick="about(); return false">About your application’s environment</a></h3>
|
|
250
|
-
<div id="about-content" style="display: none"></div>
|
|
251
|
-
</div>
|
|
252
|
-
|
|
253
|
-
<div id="getting-started">
|
|
254
|
-
<h1>Getting started</h1>
|
|
255
|
-
<h2>Here’s how to get rolling:</h2>
|
|
256
|
-
|
|
257
|
-
<ol>
|
|
258
|
-
<li>
|
|
259
|
-
<h2>Use <code>rails generate</code> to create your models and controllers</h2>
|
|
260
|
-
<p>To see all available options, run it without parameters.</p>
|
|
261
|
-
</li>
|
|
262
|
-
|
|
263
|
-
<li>
|
|
264
|
-
<h2>Set up a default route and remove or rename this file</h2>
|
|
265
|
-
<p>Routes are set up in config/routes.rb.</p>
|
|
266
|
-
</li>
|
|
267
|
-
|
|
268
|
-
<li>
|
|
269
|
-
<h2>Create your database</h2>
|
|
270
|
-
<p>Run <code>rake db:migrate</code> to create your database. If you're not using SQLite (the default), edit <code>config/database.yml</code> with your username and password.</p>
|
|
271
|
-
</li>
|
|
272
|
-
</ol>
|
|
273
|
-
</div>
|
|
274
|
-
</div>
|
|
275
|
-
|
|
276
|
-
<div id="footer"> </div>
|
|
277
|
-
</div>
|
|
278
|
-
</body>
|
|
279
|
-
</html>
|