Open andreykul opened 7 years ago
In the shorteners controller you are using where(slug: params[:slug]).first instead of find_by slug: params[:slug].
where(slug: params[:slug]).first
find_by slug: params[:slug]
Seems easier with find_by, thank you!
find_by
In the shorteners controller you are using
where(slug: params[:slug]).first
instead offind_by slug: params[:slug]
.