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: cf9c4fea7c0aa96ee2a48509d0a75b6f7cbb4fc4
4
- data.tar.gz: 2a54f8eda2c8bbccf02c0c0656958a14c0f4108e
3
+ metadata.gz: 52aa11dec723d498a634bc8b28ad30284cb45eb7
4
+ data.tar.gz: 13204ac05a6d83e86883529f73e8aa9b90c9921b
5
5
  SHA512:
6
- metadata.gz: c13cb07fc57d5b646e076738a7ed7dd8f3da6c61e13b4121c76e7217626fca437772a65b303743de5cbe9f74ed766268428770d35112726aab28cbc2398370dd
7
- data.tar.gz: df18b6e26f7bade5a8cfdf87f62ab3bc030f9760ce8c10e3c01c82366b90c024e9f8c5501b66a2fce68e295e6c188d7362d11f753803c2739c5129d8759a880a
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
- = ff.input_field :name, :as => :hidden, :value => name.to_s
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]
@@ -1,3 +1,3 @@
1
1
  module Polyblock
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -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, settings={})
61
+ def simple_fields_for_polyblock(name, f, options={})
62
62
  pb = pb_from_name(name, f)
63
- options = {
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(settings)
72
+ }.deep_merge(options)
73
+
73
74
  # Merge in legacy fields
74
- [:label, :input_html].each{|o| options[:field][o] = options[o] if options[o].present? }
75
- render :partial => 'polyblock/simple_fields_for',
76
- :locals => {:f => f, :pb => pb, :name => name, :options => options}
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.1
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-24 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails