• Alex Pooley's avatar
    Align project and personal snippet abilities · 766d8733
    Alex Pooley authored
    Mostly a search and replace for *_project_snippet and *_personal_snippet
    abilities across app and spec files. Replaced with just *_snippet and
    falling back on the type of subject to determine which policies to
    apply.
    
    There are some less trivial changes included which relate to inferring
    an abilities name from the subject class. Because ProjectSnippet is a
    child of Snippet there is some special handling around the place. There
    is perhaps potential to clean this up a bit as there is the same logic
    spread out in various locations.
    
    Various changes required after review
    
    - Renamed before_action names
    - Fixed snippet note mailer with spec
    - Removed incorrect/unecessary policy parameter
    - Fix personal snippet note policy spec
    766d8733
note_spec.rb 37.3 KB