fix last functional and integration tests after merge and jquery changes

This commit is contained in:
Reinier Balt 2010-11-09 19:57:53 +01:00
parent f2d977e12a
commit 0e81706fee
4 changed files with 11 additions and 15 deletions

View file

@ -22,7 +22,10 @@ class ContextsController < ApplicationController
format.xml { render :xml => current_user.contexts.to_xml( :except => :user_id ) }
format.rss &render_contexts_rss_feed
format.atom &render_contexts_atom_feed
format.text { render :action => 'index', :layout => false, :content_type => Mime::TEXT }
format.text do
@all_contexts = current_user.contexts.all
render :action => 'index', :layout => false, :content_type => Mime::TEXT
end
format.autocomplete { render :text => for_autocomplete(@active_contexts + @hidden_contexts, params[:term])}
end
end
@ -196,14 +199,14 @@ class ContextsController < ApplicationController
def render_contexts_rss_feed
lambda do
render_rss_feed_for current_user.contexts, :feed => feed_options,
render_rss_feed_for current_user.contexts.all, :feed => feed_options,
:item => { :description => lambda { |c| c.summary(count_undone_todos_phrase(c)) } }
end
end
def render_contexts_atom_feed
lambda do
render_atom_feed_for current_user.contexts, :feed => feed_options,
render_atom_feed_for current_user.contexts.all, :feed => feed_options,
:item => { :description => lambda { |c| c.summary(count_undone_todos_phrase(c)) },
:author => lambda { |c| nil } }
end

View file

@ -9,12 +9,12 @@ class ProjectsController < ApplicationController
def index
@source_view = params['_source_view'] || 'project_list'
@projects = current_user.projects
@projects = current_user.projects.all
@new_project = current_user.projects.build
if params[:projects_and_actions]
projects_and_actions
else
@contexts = current_user.contexts
@contexts = current_user.contexts.all
init_not_done_counts(['project'])
if params[:only_active_with_no_next_actions]
@projects = current_user.projects.active.select { |p| count_undone_todos(p) == 0 }
@ -258,7 +258,7 @@ class ProjectsController < ApplicationController
def render_rss_feed
lambda do
render_rss_feed_for current_user.projects, :feed => feed_options,
render_rss_feed_for @projects, :feed => feed_options,
:title => :name,
:item => { :description => lambda { |p| summary(p) } }
end
@ -266,7 +266,7 @@ class ProjectsController < ApplicationController
def render_atom_feed
lambda do
render_atom_feed_for current_user.projects, :feed => feed_options,
render_atom_feed_for @projects, :feed => feed_options,
:item => { :description => lambda { |p| summary(p) },
:title => :name,
:author => lambda { |p| nil } }