irie 1.0.4 → 1.0.5

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: 387c1f071ece6ddbf1b8b68614926aeb4e1dee74
4
- data.tar.gz: 7414e56624a07e9d85e1d7a5409ab135bc04b730
3
+ metadata.gz: 5f409d1f391aa9e53304a97e6f6357ffc40d5ea9
4
+ data.tar.gz: 81f44151ad5ce58128580295a60ee5b9a1f97a34
5
5
  SHA512:
6
- metadata.gz: 0aed5dea8ade5166aa3834f6c83da3828de866991d85be99fecf5a986789ebc9baf5deca249a8fe7247fe5b7dc497fd5b18f5ab2770fa250fa002ee7a95011d5
7
- data.tar.gz: 6eab82930eba73a63f00eb061a1b484292327f655245d049f4b2b931a1b581ec18d9bb9d408a80453f7598623885532d83d9b39a5251e212804fd3a67fa29813
6
+ metadata.gz: a258a07df2bcbfb081c50e47920830ed50f1e7492212e70d73d5b98dc25a12600baac8166b8ccb31d78af57731c8fb2a118a3cfc067b76257356731dc8deefc1
7
+ data.tar.gz: c141fdc765c8371416c9668ae9c834ece91ad8b98d30cd4d70ebe58156b6ae9cc36f7cac68fbfb00772e910a005a3b788e6cffb58ea0edb724343d320a13a4c8
data/README.md CHANGED
@@ -123,7 +123,7 @@ or in bulk, like:
123
123
 
124
124
  # Included if the action method exists when `extensions` is called.
125
125
  self.autoincludes = {
126
- create: [:smart_layout, :query_includes],
126
+ create: [:smart_layout],
127
127
  destroy: [:smart_layout, :query_includes],
128
128
  edit: [:smart_layout, :query_includes],
129
129
  index: [:smart_layout, :index_query, :order, :param_filters, :params_to_joins, :query_filter, :query_includes],
@@ -422,7 +422,7 @@ query_includes posts: [{comments: :guest}, :tags]
422
422
  and action-specific:
423
423
 
424
424
  ```ruby
425
- query_includes_for :create, are: [:category, :comments]
425
+ query_includes_for :update, are: [:category, :comments]
426
426
  query_includes_for :index, :show, are: [posts: [{comments: :guest}, :tags]]
427
427
  ```
428
428
 
@@ -82,7 +82,7 @@ end
82
82
  # fully-qualified module name to include, e.g. `index: '::My::Module'`, If constant,
83
83
  # it will just include constant (module), e.g. `index: ::My::Module`.
84
84
  self.autoincludes = {
85
- create: [:smart_layout, :query_includes],
85
+ create: [:smart_layout],
86
86
  destroy: [:smart_layout, :query_includes],
87
87
  edit: [:smart_layout, :query_includes],
88
88
  index: [:smart_layout, :index_query, :order, :param_filters, :params_to_joins, :query_filter, :query_includes],
@@ -91,27 +91,6 @@ module Irie
91
91
  super
92
92
  end
93
93
  end
94
-
95
- def build_resource
96
- cached = get_resource_ivar
97
- if cached
98
- logger.debug("Irie::Extensions::QueryIncludes.build_resource returning cached resource") if ::Irie.debug?
99
- return cached
100
- end
101
- logger.debug("Irie::Extensions::QueryIncludes.build_resource") if ::Irie.debug?
102
- this_includes = self.action_to_query_includes[params[:action].to_sym] || self.all_action_query_includes
103
- if this_includes && this_includes.size > 0
104
- # can return the model class, so won't call bang (includes!) method
105
- object = end_of_association_chain.includes(*this_includes)
106
-
107
- logger.debug("Irie::Extensions::QueryIncludes.build_resource: end_of_association_chain.to_sql: #{object.to_sql}") if ::Irie.debug? && object.respond_to?(:to_sql)
108
-
109
- set_resource_ivar object.send(method_for_build, *resource_params)
110
- else
111
- object
112
- end
113
- end
114
-
115
94
  end
116
95
  end
117
96
  end
@@ -1,3 +1,3 @@
1
1
  module Irie
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary S. Weaver
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-22 00:00:00.000000000 Z
12
+ date: 2014-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: inherited_resources