Skip to content

Instantly share code, notes, and snippets.

@tquiroga
Created January 14, 2015 17:46
Show Gist options
  • Select an option

  • Save tquiroga/e4358ce914669f582458 to your computer and use it in GitHub Desktop.

Select an option

Save tquiroga/e4358ce914669f582458 to your computer and use it in GitHub Desktop.

Revisions

  1. tquiroga revised this gist Jan 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ability.rb
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@


    can :index, Message, :project_id => project.id # AND user.projects.include?(project)
    #I tried adding after it, doesn't work, it's ign
    #I tried adding after it, doesn't work, it's ignored
    can :index, Message if user.projects.include?(project)
  2. tquiroga created this gist Jan 14, 2015.
    5 changes: 5 additions & 0 deletions ability.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@


    can :index, Message, :project_id => project.id # AND user.projects.include?(project)
    #I tried adding after it, doesn't work, it's ign
    can :index, Message if user.projects.include?(project)