active-component 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba4d45308921a66f144f54aeceb3cda1a874d72e
4
- data.tar.gz: b3eec18c5050fc9ed0eb4fec26f3b9d2420c6ced
3
+ metadata.gz: cbb5b87d66dd76ede2b38494bcf4c7312d061a7a
4
+ data.tar.gz: 379c7e842e21638d99ae5bafe19a1affb8850d1d
5
5
  SHA512:
6
- metadata.gz: 30a90132c878f34a78536f9181fdfcd3b5302ce416bedc454a1a0b91750fcb3e1bcbe0579cf5fb2fcdb2d9fecd13aabd76f409cf1f59a72a5913a4f8290ad484
7
- data.tar.gz: 8e75888dc8938f024e956703c33e6ee79a36c9cb8837283dc0e0d385d9296be89e45ca4a8be916ed7c38638081ad11d9079b5ed9fe67f7cd2996b5d06a6a059c
6
+ metadata.gz: c8f6f43358828754a9578dc8bf25af4ec2a73c902d4493f5ef318216bb1c484294a9d67b707d8cfb260ac3562f6f3004da42a39abeb40a0758dc4ddb8278edbd
7
+ data.tar.gz: 058879ae9fc098a721a34b99caa2535cd1a9276ad6fc96e96e44fd8fdcafc7655490597fd59acc6a6c033bbecefee078d7d0c4f4e2d62baaaf00418b73fab787
@@ -19,7 +19,7 @@ module ActiveComponent
19
19
  raise_errors(type, args) if type.nil? or args.nil?
20
20
 
21
21
  unless args[:collection].present?
22
- template(type, args)
22
+ element(type, args)
23
23
  else
24
24
  collection(type, args[:collection], args[:as], args[:locals])
25
25
  end
@@ -27,7 +27,7 @@ module ActiveComponent
27
27
 
28
28
  private
29
29
 
30
- def template(type, args)
30
+ def element(type, args)
31
31
  resource = constantize("#{type.to_s}_component").new(args)
32
32
  resource.render
33
33
  end
@@ -40,7 +40,7 @@ module ActiveComponent
40
40
  locals = locals || {}
41
41
 
42
42
  html_string = collection.map do |item|
43
- template(
43
+ element(
44
44
  type,
45
45
  locals.merge(as => item)
46
46
  )
@@ -1,3 +1,3 @@
1
1
  module ActiveComponent
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Chavez