Skip to content
This repository

Refold generated Ability comments at 80 characters #708

Merged
merged 1 commit into from over 1 year ago

2 participants

Caleb Thompson Vasiliy Ermolovich
Caleb Thompson

A lot of people still fold their code at 80 characters, so it is nice to
have generated code consider this.

Caleb Thompson calebthompson Refold generated Ability comments at 80 characters
A lot of people still fold their code at 80 characters, so it is
nice to have generated code consider this.
857dd07
Vasiliy Ermolovich nashby merged commit 3b50fed into from
Vasiliy Ermolovich nashby closed this
Vasiliy Ermolovich
Collaborator

@calebthompson thank you :heart:

Caleb Thompson

Not at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 01, 2012
Caleb Thompson calebthompson Refold generated Ability comments at 80 characters
A lot of people still fold their code at 80 characters, so it is
nice to have generated code consider this.
857dd07
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 11 additions and 7 deletions. Show diff stats Hide diff stats

  1. +11 7 lib/generators/cancan/ability/templates/ability.rb
18 lib/generators/cancan/ability/templates/ability.rb
@@ -11,18 +11,22 @@ def initialize(user)
11 11 # can :read, :all
12 12 # end
13 13 #
14   - # The first argument to `can` is the action you are giving the user permission to do.
15   - # If you pass :manage it will apply to every action. Other common actions here are
16   - # :read, :create, :update and :destroy.
  14 + # The first argument to `can` is the action you are giving the user
  15 + # permission to do.
  16 + # If you pass :manage it will apply to every action. Other common actions
  17 + # here are :read, :create, :update and :destroy.
17 18 #
18   - # The second argument is the resource the user can perform the action on. If you pass
19   - # :all it will apply to every resource. Otherwise pass a Ruby class of the resource.
  19 + # The second argument is the resource the user can perform the action on.
  20 + # If you pass :all it will apply to every resource. Otherwise pass a Ruby
  21 + # class of the resource.
20 22 #
21   - # The third argument is an optional hash of conditions to further filter the objects.
  23 + # The third argument is an optional hash of conditions to further filter the
  24 + # objects.
22 25 # For example, here the user can only update published articles.
23 26 #
24 27 # can :update, Article, :published => true
25 28 #
26   - # See the wiki for details: https://github.com/ryanb/cancan/wiki/Defining-Abilities
  29 + # See the wiki for details:
  30 + # https://github.com/ryanb/cancan/wiki/Defining-Abilities
27 31 end
28 32 end

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.