change privileged accounts to gold accounts, add platinum accounts, add favorite and tag query limiting based on level
This commit is contained in:
@@ -10,7 +10,11 @@ class FavoritesController < ApplicationController
|
||||
end
|
||||
|
||||
def create
|
||||
Post.find(params[:post_id]).add_favorite!(CurrentUser.user)
|
||||
if CurrentUser.favorite_limit.nil? || CurrentUser.favorite_count < CurrentUser.favorite_limit
|
||||
Post.find(params[:post_id]).add_favorite!(CurrentUser.user)
|
||||
else
|
||||
@error_msg = "You can only keep up to #{CurrentUser.favorite_limit} favorites. Upgrade your account to save more."
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
Reference in New Issue
Block a user