scaffold_plus 1.4.8 → 1.4.9

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: d5093afc9ab1c33b2d9770e00b60f20743f4d0d0
4
- data.tar.gz: 2c978a07bda1531c3a7860edafa6e237c7b8c360
3
+ metadata.gz: 6cbd4ac6e5d9bc77ea4d359a7bc42e0984338db6
4
+ data.tar.gz: 7211cf2bc3394d729bc9c0aa36f72e60ea79ab9d
5
5
  SHA512:
6
- metadata.gz: 4222fe33954175d81aa00a06b3e7a9a4cfdc89d9036673018f5a1800ff48851f1415c4b09e89d6d6125aef3b4e0062bf9f9ead63bc4f5e0f3453fb40e0e7d131
7
- data.tar.gz: 0cd4b1ef77b88fd3a1abf58fd404f6746aa082921070e6101ba1108b388af7d43a3db9ef1ccbcd98357316e34d6f11ac1dfdeb3ec16ab64ef739f7f76e5bb5a3
6
+ metadata.gz: 331edb6a0e4f373ff5a86af779781e0b158a5a070a8c698a2adcff505d5d26ad2804384b2d33ced8779eede0b85e2b9a1e0d4a4207e929161a636ff4217ad895
7
+ data.tar.gz: 6c5877fa87bfe29fa0b00660ff8122374f787fd05cb98b970a648c404e4ad3678fae516daa6c0d80645de8389bb073f0a80a0c885bda166b6b825e4c3b0c321f
@@ -21,11 +21,11 @@ module ScaffoldPlus
21
21
  migration_template 'created_by_migration.rb', "db/migrate/#{migration_name}.rb"
22
22
  end
23
23
 
24
- def add_to_model
24
+ def update_model
25
25
  lines = options.before? ? [ "" ] : []
26
26
  lines << [
27
27
  " def #{user}_data(action, attrib)",
28
- " #{user.camelize}.find(#{action}d_by).try('#{attrib}')",
28
+ " #{user.camelize}.find(action).try(attrib)",
29
29
  " end",
30
30
  ""
31
31
  ]
@@ -33,7 +33,7 @@ module ScaffoldPlus
33
33
  inject_into_class "app/models/#{name}.rb", class_name, lines.join("\n")
34
34
  end
35
35
 
36
- def add_to_controller
36
+ def update_controller
37
37
  file = "app/controllers/#{table_name}_controller.rb"
38
38
  inject_into_file file, after: /def update$/ do
39
39
  "\n @#{name}.updated_by = current_#{user}.id if current_#{user}"
@@ -1,3 +1,3 @@
1
1
  module ScaffoldPlus
2
- VERSION = "1.4.8"
2
+ VERSION = "1.4.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaffold_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.8
4
+ version: 1.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand