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 |
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 |
Hello everyone.
I’d show a workaround to send email asynchronously using Devise and Rails3.
Suppose we have already up and running our application with Devise and delayed_job correctly installed.
A first attempt was to add in config/initializers the following file (devise_async.rb):
12345678910111213141516#devise_async.rb
module Devise
module Models
module Confirmable
handle_asynchronously :send_confirmation_instructions
end
module Recoverable
[...]
Tags: asynchronous, delayed_job, devise, rails, rails3, ruby on rails
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