bellangerq / the-shorter-the-better Goto Github PK
View Code? Open in Web Editor NEWSimple URL shortener ✂️
Home Page: http://shrtbtr.com
Simple URL shortener ✂️
Home Page: http://shrtbtr.com
Since you are using slug
to find a record make sure to add an index on it in the database.
You are creating extra work for yourself with the except
on http_basic_authenticate_with
. Instead use only
.
You are generating a random slug, but you never check for uniqueness, neither in the database or the model.
You are suppose to have a javascript file per controller rather than per action.
I would also recommend converting to coffeescript.
I personally use kaminari
for pagination, give it a look.
I have looked into haml
, but chose to use slim
as the syntax is a bit nicer.
I would suggest adding better_errors
for development, it let's you figure out a problem right away rather than opening the console or using byebug
In the shorteners controller you are using where(slug: params[:slug]).first
instead of find_by slug: params[:slug]
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.