Skip to content
Browse files

update to rails 2.3.10

addresses Kernel#returning deprecation warnings
  • Loading branch information...
1 parent 5b8aa75 commit 807ab1b363e1007e46d7fbe115cdea5710f35b9d @cflipse committed
View
2 Gemfile
@@ -1,7 +1,7 @@
# A sample Gemfile
source "http://rubygems.org"
-gem "rails", "2.3.3"
+gem "rails", "2.3.10"
gem 'ruby-openid', '>= 2.0.4', :require => "openid"
gem 'mysql'
gem 'sqlite3-ruby', :require => "sqlite3"
View
36 Gemfile.lock
@@ -2,25 +2,25 @@ GEM
remote: http://rubygems.org/
specs:
RedCloth (4.2.3)
- actionmailer (2.3.3)
- actionpack (= 2.3.3)
- actionpack (2.3.3)
- activesupport (= 2.3.3)
- rack (~> 1.0.0)
- activerecord (2.3.3)
- activesupport (= 2.3.3)
- activeresource (2.3.3)
- activesupport (= 2.3.3)
- activesupport (2.3.3)
+ actionmailer (2.3.10)
+ actionpack (= 2.3.10)
+ actionpack (2.3.10)
+ activesupport (= 2.3.10)
+ rack (~> 1.1.0)
+ activerecord (2.3.10)
+ activesupport (= 2.3.10)
+ activeresource (2.3.10)
+ activesupport (= 2.3.10)
+ activesupport (2.3.10)
bluecloth (2.0.9)
mysql (2.8.1)
- rack (1.0.1)
- rails (2.3.3)
- actionmailer (= 2.3.3)
- actionpack (= 2.3.3)
- activerecord (= 2.3.3)
- activeresource (= 2.3.3)
- activesupport (= 2.3.3)
+ rack (1.1.0)
+ rails (2.3.10)
+ actionmailer (= 2.3.10)
+ actionpack (= 2.3.10)
+ activerecord (= 2.3.10)
+ activeresource (= 2.3.10)
+ activesupport (= 2.3.10)
rake (>= 0.8.3)
rake (0.8.7)
rspec (1.3.1)
@@ -38,7 +38,7 @@ DEPENDENCIES
RedCloth
bluecloth
mysql
- rails (= 2.3.3)
+ rails (= 2.3.10)
rspec-rails (~> 1.3.0)
ruby-openid (>= 2.0.4)
sqlite3-ruby
View
2 app/helpers/application_helper.rb
@@ -20,7 +20,7 @@ def next_page(collection)
end
def search_posts_title
- returning(params[:q].blank? ? I18n.t('txt.recent_posts', :default => 'Recent Posts') : I18n.t('txt.searching_for', :default => 'Searching for') + " '#{h params[:q]}'") do |title|
+ (params[:q].blank? ? I18n.t('txt.recent_posts', :default => 'Recent Posts') : I18n.t('txt.searching_for', :default => 'Searching for') + " '#{h params[:q]}'").tap do |title|
title << " " + I18n.t('txt.by_user', :default => 'by {{user}}', :user => h(@user.display_name)) if @user
title << " " + I18n.t('txt.in_forum', :default => 'in {{forum}}', :forum => h(@forum.name)) if @forum
end
View
4 app/models/user/posting.rb
@@ -14,7 +14,7 @@ def post(forum, attributes)
end
def reply(topic, body)
- returning topic.posts.build(:body => body) do |post|
+ topic.posts.build(:body => body).tap do |post|
post.site = topic.site
post.forum = topic.forum
post.user = self
@@ -39,4 +39,4 @@ def revise_topic(topic, attributes, is_moderator)
topic.sticky, topic.locked = attributes[:sticky], attributes[:locked] if is_moderator
topic.save
end
-end
+end
View
2 config/environment.rb
@@ -5,7 +5,7 @@
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.3.10' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
View
2 spec/models/user_spec.rb
@@ -133,7 +133,7 @@
protected
def create_user(options = {})
- returning User.new({ :login => 'quire', :email => 'quire@example.com', :password => 'monkey', :password_confirmation => 'monkey' }.merge(options)) do |u|
+ User.new({ :login => 'quire', :email => 'quire@example.com', :password => 'monkey', :password_confirmation => 'monkey' }.merge(options)).tap do |u|
u.site_id = options.key?(:site_id) ? options[:site_id] : sites(:default).id
u.save
end
View
4 vendor/plugins/active_record_context/lib/technoweenie/active_record_context.rb
@@ -38,7 +38,7 @@ def prefetch_default
end
def find_every_with_context(options)
- returning find_every_without_context(options) do |records|
+ find_every_without_context(options).tap do |records|
store_in_context records
end
end
@@ -80,4 +80,4 @@ def destroy_without_callbacks_with_context
destroy_without_callbacks_without_context
end
end
-end
+end

0 comments on commit 807ab1b

Please sign in to comment.
Something went wrong with that request. Please try again.