aina 0.2.1.beta → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e0905d6968d161cd3a11208367c0f123c6b88cb
4
- data.tar.gz: 14ba9d1001494b25f61095dce3a4d219ad592a3c
3
+ metadata.gz: e1ee20e663d5cd2e08e1c012abeeae4ab9428d4d
4
+ data.tar.gz: 1cb219d075351636ad8e235e5da73d2335af8e0f
5
5
  SHA512:
6
- metadata.gz: 5a395d3b05cef5c6e3f863de17b823a4419b05973a0b5e63ac886bfbb736bc749dcb8fb2bd55796ed157c5924252183a5c994a6bf9896c787e1383b0d9eee68a
7
- data.tar.gz: fcea3b1e2ed4139a4676a93456c21db1b45cfa90f8ea3d7299580851baff18912f8628514ef7f647a05dc7f59cf395d8aa933851513d49b17f0d1bf0fbca9624
6
+ metadata.gz: 3bd6f9a5e6709b4e6a32d61ce166509702d1729d87b0728c9abdf290b35b6dad8bc02ea1e89c1fc0579fd59b009ba5aeef748967060b53e50d13e016acffa88b
7
+ data.tar.gz: eb5a6b60bd5ecfcf1721d15f89b55fa2fc77a6c72a8d3cf949232353d85e309214d71f4108dd9bf4b48c9638b58a732c0ea64032810f55eddebaab3e68c77023
data/lib/aina/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Aina
2
- VERSION = '0.2.1.beta'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -125,6 +125,20 @@ function aina_custom_field_for($field, $value, $args = array()) {
125
125
  }
126
126
  }
127
127
  break;
128
+ case 'select':
129
+ if ( isset($args['options']) && is_array($args['options']) ) {
130
+ $return .= '<select name="' . $field . '">';
131
+ foreach ($args['options'] as $option) {
132
+ if ( $option == $value ) {
133
+ $return .= '<option value="' . $option . '">' . $option . '</option>';
134
+ }
135
+ }
136
+ foreach ($args['options'] as $option) {
137
+ $return .= '<option value="' . $option . '">' . $option . '</option>';
138
+ }
139
+ $return .= '</select>';
140
+ }
141
+ break;
128
142
  default:
129
143
  # code...
130
144
  break;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1.beta
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carles Jove i Buxeda
@@ -110,9 +110,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - '>'
113
+ - - '>='
114
114
  - !ruby/object:Gem::Version
115
- version: 1.3.1
115
+ version: '0'
116
116
  requirements: []
117
117
  rubyforge_project:
118
118
  rubygems_version: 2.0.3