material 0.3.7 → 0.3.8

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: 3e2eaa26ed95bfacb3d5457d2e94255f7cba64ca9457db9cf5a59c0ec6d25bb4
4
- data.tar.gz: 9599971fef04642baaf5d1f5618eb626795cb52cd52a0c95f274a5a28ea170cd
3
+ metadata.gz: 4de674c499e5bdeb75d4f22ba1f5703795cd72222c489e9442afed70859a2c13
4
+ data.tar.gz: 6a6fc4d73e055112fb9ec2768c9e55af4a292c645f57e28f9e16bc09648a951e
5
5
  SHA512:
6
- metadata.gz: 3eee4688baab8826d259d125552cd442ffe175439c144292d284a72162f6dc67f18b20605e96665ab7c11d5661e707a122b21205dc783363c1677a363f30b438
7
- data.tar.gz: d591fec54a9a2421f9b25e9eac798e511b1a1077fa5bcc3972f1043318166e7dd73c195010023066d13e5e656f233ea3b9a1acf758a6d1764a74b260f38a7a7a
6
+ metadata.gz: 9b3f0f43a90fcc344f2da3773c1b5b97146cf1055ff245ba05f381029dcdff95ff8ed6e3209b99870187f67e232b89896cab72257a8f517e3d8c9af46b93ce5e
7
+ data.tar.gz: c322a1661f054263c5b3552fca7ffbdea3d45183f28e2e425c909ce1ca534315d24c780105f5658331f9ab80cacf5b0b4ab1ad672b292f460fc1dbe73a7a988b
@@ -16,6 +16,7 @@ require_relative "material/concerns/mount"
16
16
  require_relative "material/concerns/collection"
17
17
  require_relative "material/concerns/format"
18
18
  require_relative "material/concerns/attributes"
19
+ require_relative "material/concerns/filter"
19
20
 
20
21
  require "material/version"
21
22
 
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Material
4
+ module Filter
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ register_component :filter_field
9
+ register_component(:filter_values) { try("#{filter_field.to_s.pluralize}_i18n") || [] }
10
+ end
11
+ end
12
+ end
@@ -5,8 +5,6 @@ module Material
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  included do
8
- register_component :filter
9
- register_component :filter_default
10
8
  register_materialize_component(:parent, :default_parent)
11
9
  register_path_component(:path, :singular_route_key)
12
10
  register_path_component(:index_path, :route_key)
@@ -13,6 +13,7 @@ module Material
13
13
  include Material::Mount
14
14
  include Material::Collection
15
15
  include Material::Format
16
+ include Material::Filter
16
17
 
17
18
  class << self
18
19
  def for(object)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Material
4
- VERSION = "0.3.7"
4
+ VERSION = "0.3.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Garside
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-28 00:00:00.000000000 Z
12
+ date: 2020-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -199,6 +199,7 @@ files:
199
199
  - lib/material/concerns/components.rb
200
200
  - lib/material/concerns/core.rb
201
201
  - lib/material/concerns/display.rb
202
+ - lib/material/concerns/filter.rb
202
203
  - lib/material/concerns/format.rb
203
204
  - lib/material/concerns/mount.rb
204
205
  - lib/material/concerns/pagination.rb
@@ -228,7 +229,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
229
  - !ruby/object:Gem::Version
229
230
  version: '0'
230
231
  requirements: []
231
- rubygems_version: 3.1.2
232
+ rubyforge_project:
233
+ rubygems_version: 2.7.6
232
234
  signing_key:
233
235
  specification_version: 4
234
236
  summary: Wrap your records with a presentation layer without cannibalizing view responsibility.