scaffold_plus 1.4.4 → 1.4.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: 2096f10ef870c0aadd3945883142cb1cbe0a1c18
4
- data.tar.gz: 999cdf1d39d0ce0620c0b67aebc0d404c19579a9
3
+ metadata.gz: 4ece67e8ad92aaaf99c68934edf293e7ebbfa16a
4
+ data.tar.gz: 97feb823ba89960e10150d7cf404f1318896377c
5
5
  SHA512:
6
- metadata.gz: c6c7ecf23e5385247c66e0e68db81a7b669b279a33e5a8c22340b69abd97bfa2e449335e4ef6b0f298d253c97bddb71362d15190ae26342a513c8d2461f11b06
7
- data.tar.gz: 66b343f36e1b8c7bc89209488e39d11f74a029be0202818c9db9ece2221c360844f5e80f15a6660dfe10424262d06283e331920d7144ab0257d4bfcd57f31f37
6
+ metadata.gz: 79a7f459acc1316ade8f590102a17deb61dd4af13ec148fd993ec86ae95251c44a8db4f145bbd9686fd8ce6e91beb5b4ef19f44883179a2a6d253c32bdcfd1da
7
+ data.tar.gz: 9ce59164c5722ffb7382072563a9c6c287118e286156717fd9178a1cd8300670a412de88acbfbbc2c5498224f5edbf826782a13273533d180d3e9ba5fd965ab0
@@ -37,12 +37,12 @@ module ScaffoldPlus
37
37
 
38
38
  def add_to_controller
39
39
  file = "app/controllers/#{table_name}_controller.rb"
40
- inject_into_file file, after: /@#{name} = #{class_name}\.new\(#{name}_params\)$/ do
41
- " @#{name}.created_by = current_#{user}.id if current_#{user}\n" +
42
- " @#{name}.updated_by = current_#{user}.id if current_#{user}\n"
43
- end
44
40
  inject_into_file file, after: /def update$/ do
45
- " @#{name}.updated_by = current_#{user}.id if current_#{user}\n"
41
+ "\n @#{name}.updated_by = current_#{user}.id if current_#{user}"
42
+ end
43
+ inject_into_file file, after: /@#{name} = #{class_name}\.new\(#{name}_params\)$/ do
44
+ "\n @#{name}.created_by = current_#{user}.id if current_#{user}" +
45
+ "\n @#{name}.updated_by = current_#{user}.id if current_#{user}"
46
46
  end
47
47
  end
48
48
 
@@ -1,3 +1,3 @@
1
1
  module ScaffoldPlus
2
- VERSION = "1.4.4"
2
+ VERSION = "1.4.5"
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.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand