Skip to content

Commit

Permalink
update to rails 2.3.10
Browse files Browse the repository at this point in the history
addresses Kernel#returning deprecation warnings
  • Loading branch information
cflipse committed Nov 28, 2010
1 parent 5b8aa75 commit 807ab1b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion 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"
Expand Down
36 changes: 18 additions & 18 deletions Gemfile.lock
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/models/user/posting.rb
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion config/environment.rb
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion spec/models/user_spec.rb
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -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.