polyblock 1.0.1 → 1.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52aa11dec723d498a634bc8b28ad30284cb45eb7
|
4
|
+
data.tar.gz: 13204ac05a6d83e86883529f73e8aa9b90c9921b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdd64a9cf8207ef93f961f524378364a36262f28ef45ea3e4959ed645c5322552bfdecdc1fd6d5d13a71883ad01cf023719d4b0cb4928e69628f552aba2df5f7
|
7
|
+
data.tar.gz: e1e20ceefd0750478d7445b26951010e093299f8f60a743130dbe5b6f3de26993c9c8589721aa26a92d6b327e292dc62654aec5edd8b9c8e3cc8cde78d27a296
|
@@ -2,10 +2,9 @@
|
|
2
2
|
- if f.object && f.object.errors[name.to_sym].any?
|
3
3
|
- f.object.errors.full_messages_for(name.to_sym).each do |e|
|
4
4
|
.alert.alert-danger= e
|
5
|
-
|
5
|
+
|
6
|
+
= ff.input_field :name, as: :hidden, value: name.to_s
|
6
7
|
- if options[:use_input_field] == false
|
7
8
|
= ff.input :content, options[:field]
|
8
9
|
- else
|
9
10
|
= ff.input_field :content, options[:field][:input_html]
|
10
|
-
-# = ff.input :content, :as => :ckeditor, :label => options[:label].is_a?(String) ? options[:label] : name.to_s.titleize,
|
11
|
-
-# :input_html => pb.content.present? ? options[:input_html].merge({:value => pb.content}) : options[:input_html]
|
data/lib/polyblock/version.rb
CHANGED
@@ -58,9 +58,9 @@ module Polyblock
|
|
58
58
|
render :partial => 'polyblock/fields_for', :locals => {:f => f, :pb => pb, :name => name, :options => options}
|
59
59
|
end
|
60
60
|
|
61
|
-
def simple_fields_for_polyblock(name, f,
|
61
|
+
def simple_fields_for_polyblock(name, f, options={})
|
62
62
|
pb = pb_from_name(name, f)
|
63
|
-
|
63
|
+
settings = {
|
64
64
|
:field => {
|
65
65
|
:as => :ckeditor,
|
66
66
|
:label => name.to_s.titleize,
|
@@ -69,11 +69,14 @@ module Polyblock
|
|
69
69
|
}
|
70
70
|
},
|
71
71
|
:use_input_field => false
|
72
|
-
}.deep_merge(
|
72
|
+
}.deep_merge(options)
|
73
|
+
|
73
74
|
# Merge in legacy fields
|
74
|
-
[:label, :input_html].each{|o|
|
75
|
-
|
76
|
-
|
75
|
+
[:label, :input_html].each{|o|
|
76
|
+
settings[:field][o] = settings[o] if settings[o].present? }
|
77
|
+
|
78
|
+
render partial: 'polyblock/simple_fields_for',
|
79
|
+
locals: { f: f, pb: pb, name: name, options: settings }
|
77
80
|
end
|
78
81
|
|
79
82
|
def simple_form_for_polyblocks(options={})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyblock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MacKinley Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|