her icon indicating copy to clipboard operation
her copied to clipboard

Her::Collection send :select does not work

Open alexd16 opened this issue 10 years ago • 0 comments

Can't make a send call for the method select to an instance of Her::Collection.

Example: class Discussion include Her::model end

Discussion.all.select { |d| d.title == 'qwe' } This returns the excepted result. Discussion.all.find_all { |d| d.title == 'qwe' } This returns the excepted result. Discussion.all.send :find_all, &Proc.new{ |d| d.title == 'qwe' } This returns the excepted result. Discussion.all.send :select, &Proc.new{ |d| d.title == 'qwe' } ArgumentError: wrong number of arguments (0 for 1..4)

I can't understand why this is happening. I am not sure if this is a problem in my code base or not. Does anyone have any ideia?

Another issue that i found is that i can't use the enumerable method #find on a Her::Collection instance, because it implements it's own find method.

Thks.

alexd16 avatar Aug 08 '14 15:08 alexd16