Hallelujah

Author's details

Name: Hery Ramihajamalala
Date registered: July 5, 2009
URL: http://my.rails-royce.org

Latest posts

  1. Reloading models in Rails 3.1 when usign Spork and cache_classes = true — January 14, 2012
  2. Rubygems mini mirror — September 27, 2011
  3. Rspec 2.x and Fixtures — March 17, 2011
  4. HTTPClient and SSL verify certificate — January 12, 2011
  5. ActiveRecord like searching object in Rails form helpers — November 17, 2010

Most commented posts

  1. Email validation in Ruby On Rails 3 or Active model without regexp — 32 comments
  2. Ruby Rails : How to bypass skip validation in Devise — 4 comments
  3. Reloading models in Rails 3.1 when usign Spork and cache_classes = true — 3 comments
  4. Class : to_s or not to_s ? That is the name ! — 2 comments
  5. Bundler default Gemfile and custom Gemfile, example of wirble — 2 comments

Author's posts listings

Mar 11

Mysql 4.x and Rails : RELEASE SAVEPOINT issue

Today with a project using mysql 4.1.22 that I have to implement some tests, I ran this error with rails 2.3.5 and I think for 2.3.x branch. Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘RELEASE SAVEPOINT …

Continue reading »

Oct 08

gettext 2.0.4 and rails 2.3.4

Rails 2.3.4 broke gettext_activerecord 2.0.4 Well I did not test other gems of the mutoh gettext set of libraries but here is the gulty code that breaks rails. Since Activerecord::Errors changed its implementation a bit, an error like this is raised : NoMethodError: undefined method `gsub’ for #<ActiveRecord::Error:0×00000002919738> from /home/hallelujah/Jail/lib/ruby/gems/1.9.1/gems/gettext_activerecord-2.0.4/lib/gettext_activerecord/validations.rb:165:in `localize_error_message’ from /home/hallelujah/Jail/lib/ruby/gems/1.9.1/gems/gettext_activerecord-2.0.4/lib/gettext_activerecord/validations.rb:112:in `block (2 …

Continue reading »

Oct 02

Ordered Hash by keys

Recently, I have to implement my own Hash sorting method. Not really with Hash but with ActiveSupport::OrderedHash I don’t like the way ActiveSupport::OrderedHash behaves with sorting functionality. It just behaves like a simple Hash I would like that sort return an ActiveSupport::OrderedHash not an Arrray!!! Why is it called OrderedHash in this case ? I …

Continue reading »

Sep 24

Wake up with Amarok and Kalarm ( or cron ) and qdbus

Well it is not ruby tip. Just a Linux and KDE tip. I am playing with dbus and wonder if I can wake up with kalarm and amarok under KDE. The answer is YES!!! PS : I plan to use ruby implementation of D-Bus and make some apps with it. let see if I have …

Continue reading »

Sep 23

Inspectable accessors

Hey, it’s been a while I posted here. So what’s the purpose ? I commonly use script/console to debug my rails applications. Today I wanted to see the values of my custom attributes model without typing model.custom_attribute. So I took a look at ActiveRecord::Base#inspect method. and the default inspect method shows me database fields. Well, …

Continue reading »

Jul 24

Blocks are Proc : Les procédures Proc et les blocks en ruby.

( For non-french readers : I am not giving up writing in english … Read the next post! ) Si vous venez d’un autre langage, le terme procédure (associé au terme fonction) doit vous dire quelque chose. Vaguement …. Allez quelques connaissances (méconnaissances) tirées de ma mémoire pour poser les bases. Par exemple, en PHP …

Continue reading »

Jul 10

Class : to_s or not to_s ? That is the name !

Many rubyist use the method Class#to_s instead of Class#name My purpose (shared by some programmers) is that to_s is just a String representation of the Class not its name!! Imagine you want to store an ordered list of inherited subclasses as a String so you can retrieve the inheritance order of each subclass. class Parent …

Continue reading »

Jul 08

Opening

Hi! This is the first time I open my own blog. I am so sorry to be french. Even if this blog is written in both language (french and english) I will write mostly in english. But mine is not perfect. Sorry about that, but it is one of the way I have found to …

Continue reading »

» Newer posts