forma 0.1.4 → 0.1.5

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: cf07b4fab7f0f2e9b08d407cf2a812581af1e064
4
- data.tar.gz: 245eb42abb25453b7276f600b2fc5224a49b6df1
3
+ metadata.gz: db864b2082efde787f42ce9ee0f19be45ba57a49
4
+ data.tar.gz: 8ef26f83babeadb8dca45ded7aae302e93cb4507
5
5
  SHA512:
6
- metadata.gz: 95525eb8b49c70d5f7d8c3761d272458e139bcb6fc320514c7ccdcfaf9ed2cec07e3cbd84897010dc52830eff3d6cae1d0ffbace59bd624060db3f22853e3ae1
7
- data.tar.gz: 416b695a981367ca66d95f59c331d9b2a62280a70e6945b16d0c418378c4eb78371e638f8ba57bcc8bca7ee611342e02821a8957b718cdcdd30dede2075c7d55
6
+ metadata.gz: 6170048156e4fae1a784982d160866c95557df6065de5d8dae718d852f243c2c6d7f7055c6fe409be6e7b6b953013f6651826fde0ff145f686bbf92b4382124a
7
+ data.tar.gz: 3ee1558ce246526dc4ca98c12b07ed0539aaf15829460a8be82304adc8495911835aa9ef6f801cef1906eac7df579a0f89540c278622cadbe3c616f871724e35
data/lib/forma/field.rb CHANGED
@@ -59,6 +59,7 @@ module Forma
59
59
  # Convert this element into HTML.
60
60
  def to_html(edit)
61
61
  val = self.value
62
+ val = val.call(self.model) if val.is_a?(Proc)
62
63
  if edit and not readonly
63
64
  edit = edit_element(val)
64
65
  el('div', children: [ before_element, icon_element, edit, after_element, actions_element, inline_hint_element ])
data/lib/forma/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Forma
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitri Kurashvili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.0.3
171
+ rubygems_version: 2.2.2
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: rich forms for ruby