diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb
index 6494137c..d962c753 100644
--- a/app/controllers/todos_controller.rb
+++ b/app/controllers/todos_controller.rb
@@ -83,7 +83,7 @@ class TodosController < ApplicationController
@todo.context_id = context.id
end
- @todo.starred= params[:new_todo_starred].include? "true"
+ @todo.starred= (params[:new_todo_starred]||"").include? "true"
@todo.add_predecessor_list(predecessor_list)
diff --git a/app/models/todo.rb b/app/models/todo.rb
index 4904b791..3a14830c 100644
--- a/app/models/todo.rb
+++ b/app/models/todo.rb
@@ -248,12 +248,12 @@ class Todo < ActiveRecord::Base
end
def toggle_star!
- starred=!starred?
+ self.starred= !starred?
end
def starred=(starred)
if starred
- _add_tags(STARRED_TAG_NAME)
+ _add_tags STARRED_TAG_NAME unless starred?
else
_remove_tags STARRED_TAG_NAME
end
diff --git a/app/views/recurring_todos/toggle_star.js.erb b/app/views/recurring_todos/toggle_star.js.erb
index 85eb1d66..129a67b5 100644
--- a/app/views/recurring_todos/toggle_star.js.erb
+++ b/app/views/recurring_todos/toggle_star.js.erb
@@ -1,5 +1,5 @@
<%- if @saved -%>
- $('div#recurring_todo_<%= @recurring_todo.id %> a.star_item img').toggleClass('starred_todo').toggleClass('unstarred_todo');
+ $('div#recurring_todo_<%= @recurring_todo.id %> a.star_item img').toggleClass('starred');
<%- else -%>
TracksPages.page_notify('error', '<%= t('todos.error_starring_recurring', :description => @recurring_todo.description) %>', 8);
<%- end -%>
diff --git a/config/environments/cucumber.rb b/config/environments/cucumber.rb
index 1ad1a7d6..64d9b6d5 100644
--- a/config/environments/cucumber.rb
+++ b/config/environments/cucumber.rb
@@ -26,8 +26,8 @@ config.action_mailer.delivery_method = :test
config.action_controller.session_store = :cookie_store
config.action_controller.session = { :key => 'TracksCucumber', :secret => SITE_CONFIG['salt'] * (30.0 / SITE_CONFIG['salt'].length).ceil }
-config.gem 'cucumber', :lib => false, :version => '=0.9.4' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber'))
-config.gem 'cucumber-rails', :lib => false, :version => '=0.3.2' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
-config.gem 'gherkin', :lib => false, :version => '=2.4.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/gherkin'))
+config.gem 'cucumber', :lib => false unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber'))
+config.gem 'cucumber-rails', :lib => false unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
+config.gem 'gherkin', :lib => false unless File.directory?(File.join(Rails.root, 'vendor/plugins/gherkin'))
config.gem 'database_cleaner', :lib => false, :version => '>=0.5.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/database_cleaner'))
config.gem 'webrat', :lib => false, :version => '>=0.7.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat'))
diff --git a/test/views/todos_helper_test.rb b/test/views/todos_helper_test.rb
index dede1b62..441ec2b5 100644
--- a/test/views/todos_helper_test.rb
+++ b/test/views/todos_helper_test.rb
@@ -63,7 +63,7 @@ class TodosHelperTest < ActiveSupport::HelperTestCase
def test_remote_star_icon_unstarred
@todo = flexmock(:id => 1, :to_param => 1, :description => 'Get gas', :starred? => false)
# added dot (.) to regexp because somehouw the extra dot is added in the tests while its not in the rendered html
- assert_remote_star_icon_helper_matches %r{
}
+ assert_remote_star_icon_helper_matches %r{
}
assert_behavior_registered
end