Author: assaf
Date: Wed Jun 25 11:38:39 2008
New Revision: 671627
URL: http://svn.apache.org/viewvc?rev=671627&view=rev
Log:
Corrected action name when rendering.
Modified:
ode/sandbox/singleshot/app/controllers/tasks_controller.rb
Modified: ode/sandbox/singleshot/app/controllers/tasks_controller.rb
URL:
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/controllers/tasks_controller.rb?rev=671627&r1=671626&r2=671627&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/controllers/tasks_controller.rb (original)
+++ ode/sandbox/singleshot/app/controllers/tasks_controller.rb Wed Jun 25
11:38:39 2008
@@ -1,6 +1,6 @@
class TasksController < ApplicationController
- access_key_authentication :only=>[:search, :completed, :following, :show]
+ access_key_authentication :only=>[:index, :completed, :following, :search,
:show]
verify :params=>:task, :only=>:update, :render=>{:text=>'Missing task',
:status=>:bad_request}
before_filter :set_task, :only=>[:show, :update, :complete, :destroy]
@@ -13,11 +13,11 @@
Mime::ICS=>formatted_tasks_url(:format=>:ics,
:access_key=>authenticated.access_key) }
@tasks =
Task.pending.for_stakeholder(authenticated).with_stakeholders.rank_for(authenticated)
respond_to do |wants|
- wants.html { render :action=>'inbox' }
+ wants.html { render :action=>'index' }
# TODO: wants.xml
# TODO: wants.json
- wants.atom
- wants.ics
+ wants.atom { render :action=>'tasks' }
+ wants.ics { render :action=>'tasks' }
end
end
@@ -33,8 +33,8 @@
end
# TODO: wants.xml
# TODO: wants.json
- wants.atom { render :action=>'index' }
- wants.ics { render :action=>'ics' }
+ wants.atom { render :action=>'tasks' }
+ wants.ics { render :action=>'tasks' }
end
end
@@ -45,11 +45,11 @@
Mime::ICS=>formatted_following_tasks_url(:format=>:ics,
:access_key=>authenticated.access_key) }
@tasks = Task.following.for_stakeholder(authenticated).with_stakeholders
respond_to do |wants|
- wants.html { render :action=>'index' }
+ wants.html { render :action=>'tasks' }
# TODO: wants.xml
# TODO: wants.json
- wants.atom { render :action=>'index' }
- wants.ics { render :action=>'index' }
+ wants.atom { render :action=>'tasks' }
+ wants.ics { render :action=>'tasks' }
end
end
@@ -61,11 +61,11 @@
ids = Task.find_id_by_contents(@query).last.map { |h| h[:id] }
@tasks = Task.for_stakeholder(authenticated).with_stakeholders.find(:all,
:conditions=>{ :id=>ids })
respond_to do |wants|
- wants.html { render :action=>'index' }
+ wants.html { render :action=>'tasks' }
# TODO: wants.xml
# TODO: wants.json
- wants.atom { render :action=>'index' }
- wants.ics { render :action=>'index' }
+ wants.atom { render :action=>'tasks' }
+ wants.ics { render :action=>'tasks' }
end
end