Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Danny Gagne

Posts By

PIVOTAL LABS
[Standup][NY]09/11/12: CanCan condition hashes)

Interestings

  • CanCan, condition hashes, and index actions

If you have something like:

`can :manage, Group, memberships: { user_id: user.id }`

and:

`class Group < AR::Base has_many memberships end`

you will get duplicate Groups in index action's @groups ivar when you load_and_authorize (sic) :group as CanCan will do an SQL join of the groups and memberships table.

The solution for us was to use a block and populate the @groups ivar ourselves in the action.

Events

Founded in 2004, NYC.rb is the place for experienced Ruby and Rails programmers in New York City. MEETUPS We meet on the second and fourth Tuesdays of the month. Second Tuesdays are for one or more talks, and fourth Tuesdays are just hackfests, where people bring their laptops and hang out.

PIVOTAL LABS
[Standup][NY] 9/10/12: Debugging CoffeeScript in Chrome

Interestings

Debugging CoffeeScript in Chrome

When you go to “Sources” in web inspector for a web page that includes test.js it will now show your CoffeeScript source files where you can set break points, hover variables to see their values, etc.

http://ryanflorence.com/2012/coffeescript-source-maps/

Events