smarter_listing 0.1.6 → 0.1.7

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: 19351c1f246ef842474804915fa2a930a8e7a3a6
4
- data.tar.gz: a57e0eab441b6c35176b602c573edac9af1acdad
3
+ metadata.gz: a8ee6f03e9138cfd5d59e0c540e157c1a3876f20
4
+ data.tar.gz: ab5d4494eabaf221042b84e31580ec91acb92af6
5
5
  SHA512:
6
- metadata.gz: 37bab37dc8d1d5d8177b9be5ad6ee466eef23393fc824a6259aba23c4902fff802a347c79aae22079002f0c673ec8f999dcdf8e690c4b478e0edf583ff21c88d
7
- data.tar.gz: d5ded375ccf48dd0094d2c7c93600c64a57fc67bc458a44d46b88b5455bd8f6cead4f4636392af0074151a82359c578cb2dc134b5a9ac7356c26f677cc337a17
6
+ metadata.gz: db09edac5bcd9f103a2cd01ce3398575172f2743d9515b2db1a06f9a4bb652c2fa433613343183473074b2e134532dd19b06c8bd4a13c8f317693262907dcf01
7
+ data.tar.gz: 9427e064474110eb8c245405b7fcac058e5a8dde91bf6e8359f02f7243b7bc462a79e448cfd7289a34e1038f79f531ea0d7debd9eaf60e8d4ddee55b9dbf3efe
@@ -14,12 +14,12 @@ module SmarterListing::ControllerExtension
14
14
  end
15
15
 
16
16
  def new
17
- instance_variable_get(resource_ivar) || instance_variable_set(resource_ivar, model.new(resource_params))
17
+ instance_variable_get(resource_ivar) || instance_variable_set(resource_ivar, model.new(_resource_params))
18
18
  render 'smarter_listing/new'
19
19
  end
20
20
 
21
21
  def create
22
- instance_variable_get(resource_ivar) || instance_variable_set(resource_ivar, model.create(resource_params))
22
+ instance_variable_get(resource_ivar) || instance_variable_set(resource_ivar, model.create(_resource_params))
23
23
  render 'smarter_listing/create'
24
24
  end
25
25
 
@@ -39,7 +39,7 @@ module SmarterListing::ControllerExtension
39
39
  end
40
40
 
41
41
  def update
42
- resource.update resource_params
42
+ resource.update _resource_params
43
43
  render 'smarter_listing/update'
44
44
  end
45
45
 
@@ -61,7 +61,7 @@ module SmarterListing::ControllerExtension
61
61
  end
62
62
 
63
63
  def load_resource
64
- instance_variable_set resource_ivar, (model.find(params[:id]) rescue (action_name == 'new' ? model.new(resource_params) : nil))
64
+ instance_variable_set resource_ivar, (model.find(params[:id]) rescue (action_name == 'new' ? model.new(_resource_params) : nil))
65
65
  end
66
66
 
67
67
  def resource
@@ -17,6 +17,10 @@ module SmarterListing
17
17
  "@#{resource_sym}"
18
18
  end
19
19
 
20
+ def _resource_params
21
+ send "#{resource_sym}_params".to_sym
22
+ end
23
+
20
24
  def table_name
21
25
  model.name.demodulize.tableize.to_sym
22
26
  end
@@ -1,3 +1,3 @@
1
1
  module SmarterListing
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smarter_listing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Sprauer