Author Archive

2

COMMENTS

How to insert more Disqus comments box in a single page

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, [...]

GO
3

COMMENTS

Tips: Multiple pagination with will_paginate

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 [...]

GO
13

COMMENTS

Two step signup with Devise

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 [...]

GO
5

COMMENTS

Prevent registration of reserved login

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 [...]

GO
8

COMMENTS

Ruby Enumerables: Operation on hashes

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 [...]

GO

Copyright 2012 DevInterface s.n.c.

DevInterface Blog is proudly powered by WordPress