bellangerq / the-shorter-the-better

Simple URL shortener ✂️
http://shrtbtr.com
0 stars 1 forks source link

Using where,first instead of find_by #2

Open andreykul opened 7 years ago

andreykul commented 7 years ago

In the shorteners controller you are using where(slug: params[:slug]).first instead of find_by slug: params[:slug].

bellangerq commented 7 years ago

Seems easier with find_by, thank you!