Modified:
trunk/ChangeLog
trunk/app/controllers/notes_controller.rb
trunk/app/models/article_sweeper.rb
trunk/config/routes.example.rb
trunk/test/fixtures/don_envs.yml
trunk/test/functional/notes_controller_test.rb
Log:
2008-12-29 ARAKI Yasuhiro <a...@debian.org>
* Re-enable to observe models in app/models/article_sweeper.
* Change URL for noteslist pages. (map.connect
archives/listpages/page/
Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Sun Dec 28 21:14:03 2008
@@ -1,3 +1,9 @@
+2008-12-29 ARAKI Yasuhiro <a...@debian.org>
+
+ * Re-enable to observe models in app/models/article_sweeper.
+ * Change URL for noteslist pages.
(map.connect "archives/listpages/page/:page").
+ * Change(Expand) trackback_enable_time (10years to 20years) in
test/fixtures/don_envs.yml (first).
+
2008-12-26 ARAKI Yasuhiro <a...@debian.org>
* Change "render :template =>.." to "render :file =>.." for applying
rails 2.2.2.
Modified: trunk/app/controllers/notes_controller.rb
==============================================================================
--- trunk/app/controllers/notes_controller.rb (original)
+++ trunk/app/controllers/notes_controller.rb Sun Dec 28 21:14:03 2008
@@ -638,6 +638,7 @@
end
tb.save
+
if tb.errors.empty?
@catched = true if @catched == nil
@message = 'success' if @message == nil
Modified: trunk/app/models/article_sweeper.rb
==============================================================================
--- trunk/app/models/article_sweeper.rb (original)
+++ trunk/app/models/article_sweeper.rb Sun Dec 28 21:14:03 2008
@@ -1,5 +1,6 @@
class ArticleSweeper < ActionController::Caching::Sweeper
# XXX # observe Article, Category, Comment, Trackback, Enrollment, Picture
+ observe Article, Category, Comment, Trackback, Enrollment, Picture
def after_save(record)
expire_for(record)
@@ -67,7 +68,7 @@
expire_page(:controller => '/notes', :action => 'noteslist')
begin
- ppdir = RAILS_ROOT + "/public/archives/noteslist/page"
+ ppdir = RAILS_ROOT + "/public/archives/listpages/page"
ppdir2 = Dir.entries(ppdir)
ppdir2.each do |x|
if x =~ /(\d+).html/
Modified: trunk/config/routes.example.rb
==============================================================================
--- trunk/config/routes.example.rb (original)
+++ trunk/config/routes.example.rb Sun Dec 28 21:14:03 2008
@@ -7,11 +7,11 @@
# The priority is based upon order of creation: first created -> highest
priority.
map.connect '', :controller => "notes", :action => "noteslist", :page
=> '1'
+ map.connect "archives/listpages/page/:page", :controller
=> "notes", :action => "noteslist", :requirements => { :page => /\d+/}
map.connect "archives/", :controller => "notes", :action
=> "noteslist" , :page => '1'
map.connect "archives/index", :controller => "notes", :action
=> "noteslist" , :page => '1'
map.connect "archives/noteslist/notice/:notice", :controller
=> "notes", :action => "noteslist" # r378
map.connect "archives/noteslist", :controller => "notes", :action
=> "noteslist" , :page => '1'
- map.connect "archives/noteslist/page/:page", :controller
=> "notes", :action => "noteslist", :page => /\d+/
map.connect "archives/articles_author/:id", :controller
=> "notes", :action => "articles_author", :id => /\d+/, :page => '1'
map.connect "archives/articles_author/:id/page/:page", :controller
=> "notes", :action => "articles_author",
Modified: trunk/test/fixtures/don_envs.yml
==============================================================================
--- trunk/test/fixtures/don_envs.yml (original)
+++ trunk/test/fixtures/don_envs.yml Sun Dec 28 21:14:03 2008
@@ -15,7 +15,8 @@
url_limit: 1
## default_theme: custom
default_theme: MT
- trackback_enable_time: 315360000
+ trackback_enable_time: 630720000
+## trackback_enable_time:
akismet_key: 64c061aa654f
notify_level: 2
ping_async: 0
Modified: trunk/test/functional/notes_controller_test.rb
==============================================================================
--- trunk/test/functional/notes_controller_test.rb (original)
+++ trunk/test/functional/notes_controller_test.rb Sun Dec 28 21:14:03 2008
@@ -23,6 +23,7 @@
:blog_name => 'test of donrails'
require_response_body = "<?xml version=\"1.0\"
encoding=\"utf-8\"?>\n<response>\n <error>0</error>\n
<message>success</message>\n</response>\n"
+
assert_response :success
assert_match require_response_body, @response.body
end