Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix last paren problem. Introduce raising Routing Error when @user no…

…t found.
  • Loading branch information...
commit 4452f268b58eca94633d393a764649e0fe6cbd88 1 parent e619c97
@sudara authored
View
2  app/controllers/application_controller.rb
@@ -81,7 +81,7 @@ def currently_online
def find_user
login = params[:login] || params[:id]
- @user = User.find_by_login(login) || current_user
+ @user = User.find_by_login(login) || current_user || raise(ActionController::RoutingError, 'user not found')
end
def current_user_is_admin_or_owner?(user)
View
2  app/views/shared/_playlist.html.erb
@@ -4,5 +4,5 @@
<%= image_tag(playlist.cover(:large), :class => 'cover_125', :alt => "#{h(playlist.title)} by #{h(playlist.user.name)}") %>
- <%= link_to(h(playlist.title)+(playlist.year.present?) ? " (#{playlist.year})" : ''), user_playlist_path(playlist.user.login, playlist), :class => 'small_playlist_title',:title => "#{h(playlist.title)} by #{h(playlist.user.name)}" ) %>
+ <%= link_to(h(playlist.title)+(playlist.year.present? ? " (#{playlist.year})" : ''), user_playlist_path(playlist.user.login, playlist), :class => 'small_playlist_title',:title => "#{h(playlist.title)} by #{h(playlist.user.name)}" ) %>
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.