linked_rails 0.0.4.pre.g96885856b → 0.0.4.pre.gc866c1806

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
  SHA256:
3
- metadata.gz: 91c75addc6ea759a73ff4fdce94549494d623fe819ee7ed0d2ea1557e7c2ac91
4
- data.tar.gz: 4fcd4f439831e7aa196fa2fe610263949dfc316bb4566c9cb94562eb67e1c304
3
+ metadata.gz: c7b4b4fa0d60ccdcc20d5a6d8ef0349f5297df898edbe43b1e01b60ecbac0c1d
4
+ data.tar.gz: 2bfa506972dcd36d90eae54db4042894b5ef93555d54a4b8e3c74182f85fbd60
5
5
  SHA512:
6
- metadata.gz: ffcb80ce21ecbb28c0d42c79115b998bd859e689acbc4fcbb61ae6a494e75c09f3b906a466141412331fb5cc7076527fcf92fa227a58d00040db732d6123d350
7
- data.tar.gz: e72f2247fa7ff7ca882e0644c69ed072e5ab93af8f02842f3495c3522e1fa300ce915703fcd297c21d36b1b658ccb7d0b3194aa4836fb7cf76afecec2e2bfeb0
6
+ metadata.gz: 95a82ed0863b9073d1103338e6945984fb3e8743b500a3358e90b9092e394d8fad34584d0d0f86da1c8ffac25c4539544066de4c0e7adc59a8758ccf590923fc
7
+ data.tar.gz: a6143d72aac114b0892e20bd22d992c823fd98d9670f3cf46000aadff007b6d95c448a1388ea8432a98146931b4962e062b41a976c0dadffa1d86d1ab34290d3
@@ -8,8 +8,9 @@ module LinkedRails
8
8
  include LinkedRails::Model
9
9
 
10
10
  attr_accessor :collection, :filter
11
- delegate :apply_scope, :association_base, :association_class, :default_page_size, :display, :include_members,
12
- :parent, :policy, :total_page_count, :unfiltered_collection, :user_context, to: :collection
11
+ delegate :apply_scope, :association_base, :association_class, :child_resource, :default_page_size, :display,
12
+ :include_members,:parent, :policy, :total_page_count, :unfiltered_collection, :user_context,
13
+ to: :collection
13
14
  delegate :count, to: :members
14
15
 
15
16
  alias id iri
@@ -41,7 +41,7 @@ module LinkedRails
41
41
  def blob_preview_iri
42
42
  return unless ActiveStorage::Blob.service.present?
43
43
 
44
- "#{LinkedRails.iri(path: 'rails/active_storage/blobs/redirect')}/{signed_id}/preview')"
44
+ "#{LinkedRails.iri(path: 'rails/active_storage/blobs/redirect')}/{signed_id}/preview"
45
45
  end
46
46
 
47
47
  def blob_upload_iri
@@ -81,7 +81,7 @@ module LinkedRails
81
81
  parent = parent_from_params(params, user_context)
82
82
  return if parent.blank?
83
83
 
84
- parent.menu_sequence
84
+ parent.try(:menu_sequence)
85
85
  end
86
86
  end
87
87
  end
@@ -58,7 +58,10 @@ module LinkedRails
58
58
  end
59
59
 
60
60
  def new_resource_from_parent
61
- return requested_resource.child_resource if requested_resource.is_a?(Collection)
61
+ if requested_resource.is_a?(LinkedRails.collection_class) ||
62
+ requested_resource.is_a?(LinkedRails.collection_view_class)
63
+ return requested_resource.child_resource
64
+ end
62
65
 
63
66
  parent_resource.build_child(
64
67
  controller_class,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linked_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.pre.g96885856b
4
+ version: 0.0.4.pre.gc866c1806
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Dingemans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-17 00:00:00.000000000 Z
11
+ date: 2022-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_response