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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ece67e8ad92aaaf99c68934edf293e7ebbfa16a
|
4
|
+
data.tar.gz: 97feb823ba89960e10150d7cf404f1318896377c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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}
|
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
|
|