Module: CanCan::Links::Rest

Defined in:
lib/cancan-rest-links/labels.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.translateObject

Returns the value of attribute translate.



8
9
10
# File 'lib/cancan-rest-links/labels.rb', line 8

def translate
  @translate
end

Class Method Details

.labelsObject



4
5
6
# File 'lib/cancan-rest-links/labels.rb', line 4

def labels
  @lbs ||= translate_labels? ? translate_labels : default_labels
end

.rest_labelsObject



14
15
16
# File 'lib/cancan-rest-links/labels.rb', line 14

def rest_labels
  %w{index new edit delete show confirm}
end

.translate_labels?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/cancan-rest-links/labels.rb', line 10

def translate_labels?
  translate
end