beyond_canvas 0.18.0.pre → 0.19.0.pre

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
  SHA256:
3
- metadata.gz: 5fd981b5a4acb3f12f96fba1b63059db4c4e79cffb4ea21a5fa3d6ba8defdbfe
4
- data.tar.gz: cab334b7d0ab25b9d95bc09135067c11fc93acdfaccd3d92d19527ba32fd58ab
3
+ metadata.gz: 8497d52ad577ad1bd0cdebd09e869d11ea2887a31fdc989b1bef6a17857dc2c8
4
+ data.tar.gz: cb77eecd56a81ab9bfc2f222e6899f9c689f5ede39d1b4410d7c45074dbd4e96
5
5
  SHA512:
6
- metadata.gz: 28dde2a9390a77be6893a3199727179f2a3c2733cd0b312db67d78b163b227e66955844fcced51c8749a5a0bf6310e101b6851be9675b1a1c9d2f9720f6efb05
7
- data.tar.gz: 3416dc5aa677d830870de69289518a6cb65098a05e3b1d33f00d5eb20b099209e3352718c919ecb97fa04d91b42acc4f62241e901c963b651423c7077a949411
6
+ metadata.gz: ee33312698d87e1449db902b91374a5b35f17d872f6e3c132a4bf758676f05a4574fee66fbfdf7dbce3f67b43f8dc524579dbe687307c72f8f21711770bbf93c
7
+ data.tar.gz: 2869d5f1ab74828a384dc090d745497542739729d6874b4cf8c913a01fee58be62205e08d93d1abcfcda41eba0337d97db758fe3531fb555b38758e11609af2d
@@ -29,6 +29,11 @@ select {
29
29
  background-repeat: no-repeat;
30
30
  }
31
31
 
32
+ textarea {
33
+ min-height: 100px;
34
+ resize: vertical;
35
+ }
36
+
32
37
  #{$all-text-inputs},
33
38
  select {
34
39
  &.input__error {
@@ -2,10 +2,6 @@
2
2
 
3
3
  module BeyondCanvas
4
4
  class FormBuilder < ActionView::Helpers::FormBuilder # :nodoc:
5
- ############################################################################
6
- # Wrappers
7
- ############################################################################
8
-
9
5
  def field_wrapper(attribute, args, &block)
10
6
  label = args[:label] == false ? nil : args[:label].presence || attribute.to_s.humanize
11
7
 
@@ -38,14 +34,20 @@ module BeyondCanvas
38
34
  end
39
35
  end
40
36
 
41
- %i[email text number password].each do |method|
42
- define_method :"#{method}_field" do |attribute, args = {}|
37
+ %i[email_field text_field number_field password_field text_area].each do |method|
38
+ define_method method do |attribute, args = {}|
43
39
  field_wrapper(attribute, args) do
44
40
  super(attribute, args)
45
41
  end
46
42
  end
47
43
  end
48
44
 
45
+ def select(attribute, choices, options = {}, args = {})
46
+ field_wrapper(attribute, args) do
47
+ super(attribute, choices, options, args)
48
+ end
49
+ end
50
+
49
51
  def check_box(attribute, args = {})
50
52
  inline_wrapper(attribute, args) do
51
53
  filed_identifyer = filed_identifyer(attribute)
@@ -16,7 +16,7 @@
16
16
 
17
17
  <% path = Rails.application.routes.recognize_path(url) %>
18
18
 
19
- <% options = options.merge(class: 'menu__item--active') { |_key, old_val, new_val| [new_val, old_val].join(' ') if !external_url && path[:controller] == params[:controller] } %>
19
+ <% options = options.merge(class: 'menu__item--active') { |_key, old_val, new_val| [new_val, old_val].join(' ') } if !external_url && (path[:controller] == params[:controller]) %>
20
20
  <% options = options.merge(class: 'menu__item') { |_key, old_val, new_val| [new_val, old_val].join(' ') } %>
21
21
 
22
22
  <%= link_to name, url, options %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BeyondCanvas
4
- VERSION = '0.18.0.pre'
4
+ VERSION = '0.19.0.pre'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond_canvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0.pre
4
+ version: 0.19.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Unai Abrisketa
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-10-06 00:00:00.000000000 Z
13
+ date: 2020-10-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: attr_encrypted