Hello everyone!
For those not familiar Disqus is a platform that allows you to easily insert a box for comments on any website and allows users to use the their Facebook or Twitter account (but not only) to authenticate.
The limit of Disqus is that it associates any thread of comments to a unique url.
Consequently, [...]
Tags: comments, disqus, haml, jqeury, ruby on rails
Posted in Development, JQuery, Ruby |
Will Paginate is a great and widely used gem for pagination in Ruby on Rails.
Sometimes you need to paginate multiple list on the same page.
This tip show you how to put a list of paginated products and a list of of paginated services on the same page with will_paginate.
The key point is to use a [...]
Tags: rails, ruby, ruby on rails, Tips, will_paginate
Posted in Tips |
On my Ruby on Rails projects I usually use the Devise gem for user authentication.
In the last application I need to customize Devise so that users can register providing email address only. I will ask for a password only at the confirmation step.
After some tests, I come with this solutions.
1. First I need to overwrite [...]
Tags: customization, devise, haml, rails, registration, ruby, ruby on rails, signup
Posted in Development, Ruby |
Every time you create a web application where users can register, it is good to exclude some login or username so that they can not be used.
A classic example is the login “admin”.
I believe that no one wishes that in its application will be a registered user with the username “admin” then can contact [...]
Tags: Best Practices, login reservation, rails, ruby, ruby on rails, validation
Posted in Development, Ruby |
In my last post I talked about Ruby’s hash.
Today I will resume and complete the argument by describing some of the things you can do to manipulate the hash values.
1. How to iterate over Hash elements
The Ruby Hash class provides three different iterators: each, each_key, each_value.
There is actually a fourth iterator, each_pair but it is [...]
Tags: hash, ruby, ruby on rails, sorting, tutorial
Posted in Development, Ruby |
COMMENTS