Joined July 2012
·

thomas petrachi

Vodeclic
·
France
·
·

Posted to Ruby Core Extends over 1 year ago

Yes you'r right. I didn't knew about the #except method and it surely is better to use this than my #stealth_delete.

I may be blinded to these functionalities rails provindes because I use rails 2.3 at work.

You'r also right about opening pull request on AS. I never considered this option.

Well, I will check in deep the features AS provide before doing my own.

Posted to Ruby Core Extends over 1 year ago

This is not an alternative to ActiveSupport core extensions. To anwser your question : none.

The idea behind theses gems is the same as the idea of ActiveSupport core extentions : provide more methods because we need them, and ruby don't provide them now.

For example, the 'stealthdelete' function. There is nothing like that in ruby, neither in ActiveSupport core extentions. Nevertheless I want to be able to delete a key from my hash and returning the hash, not the value.
To do something like (rails) : Membre.new :attributes=>params.stealth
delete :action, :controller

I used to have a core_ext folder in my /lib (rails). I transform it into gem to use it through all my projects, and share it.

Achievements
75 Karma
1,693 Total ProTip Views