runemadsen/cancan-backbone

License?

Closed this issue · 1 comments

Looks like an excellent library!

Just to clarify, what is the license for its use? It is MIT or otherwise similar to the license of backbone.js?

BTW, Your Rails example can be simplified to:

def ability_to_array(a)
  a.send(:rules).map { |rule|
      {
        :base_behavior => rule.base_behavior,
        :subjects => rule.subjects.map(&:to_s),
        :actions => rule.actions.map(&:to_s),
        :conditions => rule.conditions
      }
    }
end

Or alternatively (as I did), define an .as_json method on the Ability class, implementing the above, without the need for the send method either.

Oh yes, forgot the license. I'll add the MIT license as soon as I'm by my computer.