noodall-ui 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,21 +11,23 @@ module Noodall::ComponentsHelper
11
11
  index = args.index(slot_code)
12
12
  component = components[index]
13
13
 
14
- additional_classes = []
15
- additional_classes << slot_code.split("_").shift unless slot_code.split("_").shift.nil?
16
- additional_classes << 'penultimate' if slot_code == args[args.size - 2]
17
- additional_classes << 'last' if args.last == slot_code
18
- additional_classes << 'first' if args.first == slot_code
14
+ #Build a string here to stop ruby 1.9 outputting a normal printed array
15
+ additional_classes = ""
16
+ additional_classes << ' ' + slot_code.split("_").shift + ' ' unless slot_code.split("_").shift.nil?
17
+ additional_classes << ' penultimate ' if slot_code == args[args.size - 2]
18
+ additional_classes << ' last ' if args.last == slot_code
19
+ additional_classes << ' first ' if args.first == slot_code
19
20
 
20
21
  # pass a flag to the view to add an expanded html class
21
- component(node, slot_code, ( components[index + 1].nil? && index < (args.size - 1) ), additional_classes.join(' ')).to_s
22
+ component(node, slot_code, ( components[index + 1].nil? && index < (args.size - 1) ), additional_classes).to_s
22
23
  end.join.html_safe
23
24
  end
24
25
 
25
26
  def component(node, slot_code, expand = false, additional_classes = '')
26
27
  component = node.send(slot_code)
27
28
 
28
- additional_classes = []
29
+ #Use a string here to stop ruby 1.9 outputting a normal printed array
30
+ additional_classes = ""
29
31
  additional_classes << slot_code.split("_").shift unless slot_code.split("_").shift.nil?
30
32
 
31
33
  render :partial => "components/#{component.class.name.underscore}", :locals => { :slot_code => slot_code, :component => component, :expand => expand, :additional_classes => additional_classes } unless component.nil?
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module UI
3
- VERSION = "0.3.11"
3
+ VERSION = "0.3.12"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noodall-ui
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 11
10
- version: 0.3.11
9
+ - 12
10
+ version: 0.3.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steve England
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-12 00:00:00 +01:00
18
+ date: 2011-05-13 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency