Skip to content

Commit

Permalink
make hearts smaller and redirect to item page on favorite!
Browse files Browse the repository at this point in the history
  • Loading branch information
trvsdnn committed Nov 14, 2012
1 parent 6f06fae commit 8d5cd5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/assets/stylesheets/application.css
Expand Up @@ -18,10 +18,10 @@

h2 .favorite {
color: #FF50A1;
font-size: 24px;
font-size: 14px;
position: absolute;
top: 7px;
left: -30px;
top: 3px;
left: -25px;
text-decoration: none;
}

Expand Down
6 changes: 5 additions & 1 deletion app/controllers/favorites_controller.rb
Expand Up @@ -12,7 +12,11 @@ def create
@item = get_item

current_user.favorite!(@item)
redirect_to favorites_path, :notice => "#{@item.title} added to favorites"
if params[:item_type] =~ /Account\z/
redirect_to [ :accounts, @item ], :notice => "#{@item.title} added to favorites"
else
redirect_to @item, :notice => "#{@item.title} added to favorites"
end
end

def destroy
Expand Down

0 comments on commit 8d5cd5a

Please sign in to comment.