validation_uniqueness_of does not guarantee uniqueness. Interesting write-up by Yogesh about things to remember while working with uniqueness in Rails.
blog
How The Use Of Service Classes Enhances Code-quality
Good post from Rishi on how to refactor code into Service Objects to improve code maintainability and quality.
Learning shall never stop..!!!
ServiceClasses are nothing but plain old ruby classes. But they go a long way to keep your controllers thin and models thin. To show what I mean by this, lets look at some code. This is the code in controller to download data following some set of rules.
This is bad. The controller should not look like this. Comes in Service classes.
The ideology behind service classes is that it should have only one purpose to serve and nothing else.
And I can clearly see a purpose which our new service class should serve and that is to provide the data for our template download and nothing else. I keep the service classes under app/services folder. Also I do not think I need to iterate much on the importance of the name of the service class you choose. It goes without saying that the name should tell the purpose it…
View original post 237 more words
What It Takes To Write A Chrome Extension
Here is an excellent post on how to write Chrome extensions. It’s complete with an example using Pocket.
With a large number of services available online, we tend to to spend most of our time on our browser. Well browser do come handy for a large number of activities from reading news to making travel and dining reservations. What can be better than a browser that can do some cool stuff with a click of mouse or a simple key stroke… I guess nothing
Google Chrome is the best web browser around right now (see usage statistics), and part of Chrome’s appeal is owed to its excellent extensions. Its not really hard write simple extension to get your work done.
All it needs is a little javascript, html and may be some css if you want things to be a little more pretty.
So lets build one…
Purpose: Export Chrome bookmarks to Pocket account.
Requirements:
- Some javascript skills
- poor html skills
- since we want to talk…
View original post 548 more words
