diff options
| author | Zog | 2018-01-22 11:39:34 +0100 | 
|---|---|---|
| committer | Zog | 2018-01-25 17:18:01 +0100 | 
| commit | 9f4584ef7427575fce4b8294b79f2368b130d8b6 (patch) | |
| tree | 355e20805bd8af1bc832a707401e2005261562b7 /lib/af83/decorator | |
| parent | ff5d96b530a41669c394b7b0dc138e29da48e97d (diff) | |
| download | chouette-core-9f4584ef7427575fce4b8294b79f2368b130d8b6.tar.bz2 | |
Refs #5586; CR #2
Diffstat (limited to 'lib/af83/decorator')
| -rw-r--r-- | lib/af83/decorator/link.rb | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/af83/decorator/link.rb b/lib/af83/decorator/link.rb index b1958532f..55db3f5bb 100644 --- a/lib/af83/decorator/link.rb +++ b/lib/af83/decorator/link.rb @@ -111,14 +111,14 @@ class AF83::Decorator::Link      "Missing attributes: #{@missing_attributes.to_sentence}"    end -  def extra_class val=nil -    if val.present? -      @options[:link_class] ||= [] -      @options[:link_class] << val -      @options[:link_class].flatten! -    else -      (options[:link_class] || []).join(' ') -    end +  def add_class val +    @options[:link_class] ||= [] +    @options[:link_class] << val +    @options[:link_class].flatten! +  end + +  def extra_class +    (options[:link_class] || []).join(' ')    end    def html_options  | 
