rails_admin_robots_txt 0.1.0 → 0.1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_admin_robots_txt/action.rb +7 -7
- data/lib/rails_admin_robots_txt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 535d026f9861e01bbce505b60c6c363a6c6cc055
|
4
|
+
data.tar.gz: 7e6a5f690379d064f02b2bf527c689c38cc099dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64e774b16d44c0ad22210d7bfe091a961f3cd10e9c49bf08099037f3536593898cf939bd7598f96a8669828dd69f1d7bde120a99a750f3fb082c36f8003e8cda
|
7
|
+
data.tar.gz: 7efc2c45626f465564996c7499e52ac918e7df569418cdc0c56f0b72e2e04835032f96aec0bb7ed74bb4c1a9bb9bce77d609e6319236c26502aeaf286c593dc9
|
@@ -29,13 +29,13 @@ module RailsAdmin
|
|
29
29
|
text = File.read(Rails.root.join("public", "robots.txt"))
|
30
30
|
|
31
31
|
# {value: text, cols: 80..150, cols: 5..20}
|
32
|
-
textarea_opts = {value: text}
|
33
|
-
textarea_opts[:cols] = text.lines.map(&:size).max || 80
|
34
|
-
textarea_opts[:cols] = 80 if textarea_opts[:cols] < 80
|
35
|
-
textarea_opts[:cols] = 150 if textarea_opts[:cols] > 150
|
36
|
-
textarea_opts[:rows] = text.lines.count + 1
|
37
|
-
textarea_opts[:rows] = 5
|
38
|
-
textarea_opts[:rows] = 20
|
32
|
+
@textarea_opts = {value: text}
|
33
|
+
@textarea_opts[:cols] = text.lines.map(&:size).max || 80
|
34
|
+
@textarea_opts[:cols] = 80 if @textarea_opts[:cols] < 80
|
35
|
+
@textarea_opts[:cols] = 150 if @textarea_opts[:cols] > 150
|
36
|
+
@textarea_opts[:rows] = text.lines.count + 1
|
37
|
+
@textarea_opts[:rows] = 5 if @textarea_opts[:rows] < 5
|
38
|
+
@textarea_opts[:rows] = 20 if @textarea_opts[:rows] > 20
|
39
39
|
|
40
40
|
render action: @action.template_name
|
41
41
|
|