Skip to content

Instantly share code, notes, and snippets.

View hrdwdmrbl's full-sized avatar
👨‍🎨
Creating

Marc Beaupre hrdwdmrbl

👨‍🎨
Creating
View GitHub Profile
@hrdwdmrbl
hrdwdmrbl / ruby_on_rails_count_monkeypatch
Created December 16, 2011 15:13
Count does not work
companies.count
=> 3
companies.class
=> Array
companies[0]
=> #<Company id: 7, name: "company10", logo: nil, description: nil, number_of_employees: nil, creation_date: nil, headquarters: nil, website: nil, feed: nil, blog: nil, public_page: true>
companies[1]
=> #<Company id: 12, name: "HuWhere", logo: nil, description: "", number_of_employees: 2, creation_date: "2011-11-11", headquarters: "Montreal", website: "google.com", feed: "google.com", blog: "www.google.com", public_page: true>
companies[2]
=> #<Company id: 14, name: "HuWhere", logo: nil, description: "", number_of_employees: 2, creation_date: "2011-11-11", headquarters: "Montreal", website: "google.com", feed: "google.com", blog: "www.google.com", public_page: true>