Skip to content

Commit

Permalink
Issue 2947: show fandom when fandom doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
CristinaRO committed Mar 4, 2012
1 parent 48a9cfb commit 410a751
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/controllers/fandoms_controller.rb
Expand Up @@ -29,6 +29,10 @@ def index

def show
@fandom = Fandom.find_by_name(params[:id])
if @fandom.nil?
flash[:error] = ts("Could not find fandom named %{fandom_name}", :fandom_name => params[:id])
redirect_to media_path and return
end
@characters = @fandom.characters.canonical.by_name
end

Expand Down
4 changes: 2 additions & 2 deletions app/views/fandoms/show.html.erb
Expand Up @@ -4,8 +4,8 @@

<!--subnavigation, sorting and actions-->
<ul class="navigation actions" role="navigation">
<li><%= link_to "Works", tag_works_path(@fandom) %></li>
<li><%= link_to "Bookmarks", tag_bookmarks_path(@fandom) %></li>
<li><%= link_to ts("Works"), tag_works_path(@fandom) %></li>
<li><%= link_to ts("Bookmarks"), tag_bookmarks_path(@fandom) %></li>
</ul>
<!--subnav-->

Expand Down

0 comments on commit 410a751

Please sign in to comment.