formtastic_visible_hidden_input 0.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3cd97ec3e3ba5ba7c2fc5a78f807c24a4df28856
4
+ data.tar.gz: b2d01eb7dd8275ef500dcdb29f1d95c3744fceac
5
+ SHA512:
6
+ metadata.gz: e8c5d52980c32f1aa1553fa010fa1e0d57ba8c74283751ad9a180138c1f53c2e51ec2cd1a5d546a690527a906c2116bad7ef7763e597ec8d0b965894bf0cc34b
7
+ data.tar.gz: 6afd2a6e0e78db16d2ef769f1e67647f33b527a2074731a543ac10a9066d313eff9062fbaeed284b34ed3440537fa76b4b8e6f8956775b0b74c07f8db31dae9b
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ bin/*
6
+ .idea
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in formtastic_date_as_string.gemspec
4
+ gemspec
5
+
6
+ gem 'rake'
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "formtastic/visible_hidden_input/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "formtastic_visible_hidden_input"
7
+ s.version = Formtastic::VisibleHiddenInput::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Paul Kamer"]
10
+ s.email = ["paulkamer@gmail.com"]
11
+ s.homepage = "http://github.com/paulkamer/formtastic_visible_hidden_input"
12
+ s.summary = %q{Show label and phrase for hidden Formstastic inputs}
13
+ s.description = %q{Show label and phrase for hidden Formstastic inputs by showing label and string representation of the input value}
14
+ s.license = "MIT"
15
+
16
+ s.add_dependency('formtastic', ["~> 3.0"])
17
+
18
+ s.files = `git ls-files`.split("\n")
19
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
+ s.require_paths = ["lib"]
22
+
23
+ end
@@ -0,0 +1,23 @@
1
+ module Formtastic
2
+ module Inputs
3
+ class VisibleHiddenInput
4
+ include Base
5
+
6
+ def to_html
7
+ input_wrapping do
8
+ label_html << builder.hidden_field(method, input_html_options) << get_value
9
+ end
10
+ end
11
+
12
+ protected
13
+
14
+ def get_value
15
+ object.send(method).send(value_formatter)
16
+ end
17
+
18
+ def value_formatter
19
+ options.key?(:value_formatter) ? options[:value_formatter] : 'to_s'
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ module Formtastic
2
+ module VisibleHiddenInput
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
@@ -0,0 +1,2 @@
1
+ require 'formtastic'
2
+ require 'formtastic/visible_hidden_input'
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: formtastic_visible_hidden_input
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Paul Kamer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: formtastic
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ description: Show label and phrase for hidden Formstastic inputs by showing label
28
+ and string representation of the input value
29
+ email:
30
+ - paulkamer@gmail.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".gitignore"
36
+ - Gemfile
37
+ - Rakefile
38
+ - formtastic_visible_hidden_input.gemspec
39
+ - lib/formtastic/visible_hidden_input.rb
40
+ - lib/formtastic/visible_hidden_input/version.rb
41
+ - lib/formtastic_visible_hidden_input.rb
42
+ homepage: http://github.com/paulkamer/formtastic_visible_hidden_input
43
+ licenses:
44
+ - MIT
45
+ metadata: {}
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.4.8
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Show label and phrase for hidden Formstastic inputs
66
+ test_files: []