Skip to content

Commit

Permalink
Fix deprecation warning
Browse files Browse the repository at this point in the history
DEPRECATION WARNING: Passing the format in the template name is deprecated. Please pass render with :formats => [:html] instead.
  • Loading branch information
carols10cents committed Aug 13, 2012
1 parent 8634052 commit 6f8ccda
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/controllers/salmon_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def feeds
status 200
return
rescue MongoMapper::DocumentNotFound, ArgumentError, RstatUs::InvalidSalmonMessage
render :file => "#{Rails.root}/public/404.html", :status => 404
render :file => "#{Rails.root}/public/404", :status => 404
return
end
end
2 changes: 1 addition & 1 deletion app/controllers/updates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def show
if @update
render :layout => "update"
else
render :file => "#{Rails.root}/public/404.html", :status => 404
render :file => "#{Rails.root}/public/404", :status => 404
end
end

Expand Down
8 changes: 4 additions & 4 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def index

def show
if @user.nil?
render :file => "#{Rails.root}/public/404.html", :status => 404
render :file => "#{Rails.root}/public/404", :status => 404
elsif @user.username != params[:id] # case difference
@title = @user.username
redirect_to user_path(@user)
Expand Down Expand Up @@ -106,15 +106,15 @@ def feed
if @user
redirect_to feed_path(@user.feed, :format => :atom)
else
render :file => "#{Rails.root}/public/404.html", :status => 404
render :file => "#{Rails.root}/public/404", :status => 404
end
end

# Who do you think is a really neat person? This page will show it to the
# world, so pick wisely!
def following
if @user.nil?
render :file => "#{Rails.root}/public/404.html", :status => 404
render :file => "#{Rails.root}/public/404", :status => 404
# If the username's case entered in the URL is different than the case
# specified by that user, redirect to the case that the user prefers
elsif @user.username != params[:id]
Expand Down Expand Up @@ -147,7 +147,7 @@ def following
# followers. Only one way to find out...
def followers
if @user.nil?
render :file => "#{Rails.root}/public/404.html", :status => 404
render :file => "#{Rails.root}/public/404", :status => 404
# If the username's case entered in the URL is different than the case
# specified by that user, redirect to the case that the user prefers
elsif @user.username != params[:id]
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/webfinger_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def xrd
@base_url = root_url
render "xml/webfinger/xrd", :layout => false, :content_type => "application/xrd+xml"
else
render :file => "#{Rails.root}/public/404.html", :status => 404
render :file => "#{Rails.root}/public/404", :status => 404
end
end
end

0 comments on commit 6f8ccda

Please sign in to comment.