Permalink
Browse files

Upgraded to Rails 2.2.2

  • Loading branch information...
conrad
conrad committed Feb 27, 2009
1 parent 28d8a0a commit b88e3d92397bff9afa7b1ff72a87913734709757
Showing 1,492 changed files with 214,434 additions and 9 deletions.
View
@@ -0,0 +1,4 @@
+log/*.log
+tmp/**/*
+*~
+.#*
View
@@ -4,14 +4,7 @@ class Post < ActiveRecord::Base
validates_presence_of :title, :description, :category_id, :author, :email
def Post.recent_items
- num_recent = 0
-
- posts = Post.find_all
- posts.each do |p|
- num_recent += 1 if p.created_at > (7.days/NOTIFY_FREQUENCY).ago
- end
-
- num_recent
+ Post.find(:all, :conditions => ['created_at > ?', (7.days/NOTIFY_FREQUENCY).ago]).length
end
end
View
@@ -39,6 +39,7 @@
# config.active_record.default_timezone = :utc
# See Rails::Configuration for more options
+ config.action_controller.session = { :session_key => "_gracelist_session", :secret => "beimitatorsofgodthereforeasdearlylovedchildrenandlivealifeoflovejustaschristlovedus" }
end
# Add new inflection rules using the following format
@@ -58,7 +59,7 @@
c = YAML::load(File.open("#{RAILS_ROOT}/config/config.yml"))
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.delivery_method = c[RAILS_ENV]['email']['delivery_method']
-ActionMailer::Base.server_settings = {
+ActionMailer::Base.smtp_settings = {
:address => c[RAILS_ENV]['email']['server'],
:port => c[RAILS_ENV]['email']['port'],
:domain => c[RAILS_ENV]['email']['domain'],
View
No changes.
View
No changes.
@@ -0,0 +1,152 @@
+* Exported the changelog of Pagination code for historical reference.
+
+* Imported some patches from Rails Trac (others closed as "wontfix"):
+ #8176, #7325, #7028, #4113. Documentation is much cleaner now and there
+ are some new unobtrusive features!
+
+* Extracted Pagination from Rails trunk (r6795)
+
+#
+# ChangeLog for /trunk/actionpack/lib/action_controller/pagination.rb
+#
+# Generated by Trac 0.10.3
+# 05/20/07 23:48:02
+#
+
+09/03/06 23:28:54 david [4953]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ Docs and deprecation
+
+08/07/06 12:40:14 bitsweat [4715]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ Deprecate direct usage of @params. Update ActionView::Base for
+ instance var deprecation.
+
+06/21/06 02:16:11 rick [4476]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ Fix indent in pagination documentation. Closes #4990. [Kevin Clark]
+
+04/25/06 17:42:48 marcel [4268]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ Remove all remaining references to @params in the documentation.
+
+03/16/06 06:38:08 rick [3899]
+ * trunk/actionpack/lib/action_view/helpers/pagination_helper.rb (modified)
+ trivial documentation patch for #pagination_links [Francois
+ Beausoleil] closes #4258
+
+02/20/06 03:15:22 david [3620]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ * trunk/actionpack/test/activerecord/pagination_test.rb (modified)
+ * trunk/activerecord/CHANGELOG (modified)
+ * trunk/activerecord/lib/active_record/base.rb (modified)
+ * trunk/activerecord/test/base_test.rb (modified)
+ Added :count option to pagination that'll make it possible for the
+ ActiveRecord::Base.count call to using something else than * for the
+ count. Especially important for count queries using DISTINCT #3839
+ [skaes]. Added :select option to Base.count that'll allow you to
+ select something else than * to be counted on. Especially important
+ for count queries using DISTINCT (closes #3839) [skaes].
+
+02/09/06 09:17:40 nzkoz [3553]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ * trunk/actionpack/test/active_record_unit.rb (added)
+ * trunk/actionpack/test/activerecord (added)
+ * trunk/actionpack/test/activerecord/active_record_assertions_test.rb (added)
+ * trunk/actionpack/test/activerecord/pagination_test.rb (added)
+ * trunk/actionpack/test/controller/active_record_assertions_test.rb (deleted)
+ * trunk/actionpack/test/fixtures/companies.yml (added)
+ * trunk/actionpack/test/fixtures/company.rb (added)
+ * trunk/actionpack/test/fixtures/db_definitions (added)
+ * trunk/actionpack/test/fixtures/db_definitions/sqlite.sql (added)
+ * trunk/actionpack/test/fixtures/developer.rb (added)
+ * trunk/actionpack/test/fixtures/developers_projects.yml (added)
+ * trunk/actionpack/test/fixtures/developers.yml (added)
+ * trunk/actionpack/test/fixtures/project.rb (added)
+ * trunk/actionpack/test/fixtures/projects.yml (added)
+ * trunk/actionpack/test/fixtures/replies.yml (added)
+ * trunk/actionpack/test/fixtures/reply.rb (added)
+ * trunk/actionpack/test/fixtures/topic.rb (added)
+ * trunk/actionpack/test/fixtures/topics.yml (added)
+ * Fix pagination problems when using include
+ * Introduce Unit Tests for pagination
+ * Allow count to work with :include by using count distinct.
+
+ [Kevin Clark &amp; Jeremy Hopple]
+
+11/05/05 02:10:29 bitsweat [2878]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ Update paginator docs. Closes #2744.
+
+10/16/05 15:42:03 minam [2649]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ Update/clean up AP documentation (rdoc)
+
+08/31/05 00:13:10 ulysses [2078]
+ * trunk/actionpack/CHANGELOG (modified)
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ Add option to specify the singular name used by pagination. Closes
+ #1960
+
+08/23/05 14:24:15 minam [2041]
+ * trunk/actionpack/CHANGELOG (modified)
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ Add support for :include with pagination (subject to existing
+ constraints for :include with :limit and :offset) #1478
+ [michael@schubert.cx]
+
+07/15/05 20:27:38 david [1839]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ * trunk/actionpack/lib/action_view/helpers/pagination_helper.rb (modified)
+ More pagination speed #1334 [Stefan Kaes]
+
+07/14/05 08:02:01 david [1832]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ * trunk/actionpack/lib/action_view/helpers/pagination_helper.rb (modified)
+ * trunk/actionpack/test/controller/addresses_render_test.rb (modified)
+ Made pagination faster #1334 [Stefan Kaes]
+
+04/13/05 05:40:22 david [1159]
+ * trunk/actionpack/CHANGELOG (modified)
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ * trunk/activerecord/lib/active_record/base.rb (modified)
+ Fixed pagination to work with joins #1034 [scott@sigkill.org]
+
+04/02/05 09:11:17 david [1067]
+ * trunk/actionpack/CHANGELOG (modified)
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ * trunk/actionpack/lib/action_controller/scaffolding.rb (modified)
+ * trunk/actionpack/lib/action_controller/templates/scaffolds/list.rhtml (modified)
+ * trunk/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb (modified)
+ * trunk/railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml (modified)
+ Added pagination for scaffolding (10 items per page) #964
+ [mortonda@dgrmm.net]
+
+03/31/05 14:46:11 david [1048]
+ * trunk/actionpack/lib/action_view/helpers/pagination_helper.rb (modified)
+ Improved the message display on the exception handler pages #963
+ [Johan Sorensen]
+
+03/27/05 00:04:07 david [1017]
+ * trunk/actionpack/CHANGELOG (modified)
+ * trunk/actionpack/lib/action_view/helpers/pagination_helper.rb (modified)
+ Fixed that pagination_helper would ignore :params #947 [Sebastian
+ Kanthak]
+
+03/22/05 13:09:44 david [976]
+ * trunk/actionpack/lib/action_view/helpers/pagination_helper.rb (modified)
+ Fixed documentation and prepared for 0.11.0 release
+
+03/21/05 14:35:36 david [967]
+ * trunk/actionpack/lib/action_controller/pagination.rb (modified)
+ * trunk/actionpack/lib/action_view/helpers/pagination_helper.rb (modified)
+ Tweaked the documentation
+
+03/20/05 23:12:05 david [949]
+ * trunk/actionpack/CHANGELOG (modified)
+ * trunk/actionpack/lib/action_controller.rb (modified)
+ * trunk/actionpack/lib/action_controller/pagination.rb (added)
+ * trunk/actionpack/lib/action_view/helpers/pagination_helper.rb (added)
+ * trunk/activesupport/lib/active_support/core_ext/kernel.rb (added)
+ Added pagination support through both a controller and helper add-on
+ #817 [Sam Stephenson]
@@ -0,0 +1,18 @@
+Pagination
+==========
+
+To install:
+
+ script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination
+
+This code was extracted from Rails trunk after the release 1.2.3.
+WARNING: this code is dead. It is unmaintained, untested and full of cruft.
+
+There is a much better pagination plugin called will_paginate.
+Install it like this and glance through the README:
+
+ script/plugin install svn://errtheblog.com/svn/plugins/will_paginate
+
+It doesn't have the same API, but is in fact much nicer. You can
+have both plugins installed until you change your controller/view code that
+handles pagination. Then, simply uninstall classic_pagination.
@@ -0,0 +1,22 @@
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+desc 'Default: run unit tests.'
+task :default => :test
+
+desc 'Test the classic_pagination plugin.'
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = true
+end
+
+desc 'Generate documentation for the classic_pagination plugin.'
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'Pagination'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
@@ -0,0 +1,33 @@
+#--
+# Copyright (c) 2004-2006 David Heinemeier Hansson
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#++
+
+require 'pagination'
+require 'pagination_helper'
+
+ActionController::Base.class_eval do
+ include ActionController::Pagination
+end
+
+ActionView::Base.class_eval do
+ include ActionView::Helpers::PaginationHelper
+end
@@ -0,0 +1 @@
+puts "\n\n" + File.read(File.dirname(__FILE__) + '/README')
Oops, something went wrong.

0 comments on commit b88e3d9

Please sign in to comment.