mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
Fix CodeClimate issues
This commit is contained in:
parent
9e2ce0351d
commit
7a5a46b158
4 changed files with 17 additions and 15 deletions
|
@ -3,13 +3,13 @@ class SortedCountry
|
||||||
include ActionView::Helpers
|
include ActionView::Helpers
|
||||||
|
|
||||||
def all_options(selected = nil)
|
def all_options(selected = nil)
|
||||||
quick_options = options_for_select(quick_list, { selected: selected })
|
quick_options = options_for_select(quick_list, selected: selected)
|
||||||
|
|
||||||
# no double select
|
# no double select
|
||||||
selected = quick_list.map(&:second).include?(selected) ? '' : selected
|
selected = quick_list.map(&:second).include?(selected) ? '' : selected
|
||||||
|
|
||||||
all_options = options_for_select([['---', '---']] + all_sorted_truncated,
|
all_options = options_for_select([['---', '---']] + all_sorted_truncated,
|
||||||
{ selected: selected, disabled: ['---'] })
|
selected: selected, disabled: ['---'])
|
||||||
quick_options + all_options
|
quick_options + all_options
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
class Builder::XmlMarkup
|
module Builder
|
||||||
def epp_head
|
class XmlMarkup
|
||||||
instruct!
|
def epp_head
|
||||||
epp(
|
instruct!
|
||||||
'xmlns' => 'https://epp.tld.ee/schema/epp-ee-1.0.xsd',
|
epp(
|
||||||
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
'xmlns' => 'https://epp.tld.ee/schema/epp-ee-1.0.xsd',
|
||||||
'xsi:schemaLocation' => 'lib/schemas/epp-ee-1.0.xsd'
|
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
||||||
) do
|
'xsi:schemaLocation' => 'lib/schemas/epp-ee-1.0.xsd'
|
||||||
yield
|
) do
|
||||||
|
yield
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,7 @@ end
|
||||||
# Store console and rake changes in versions
|
# Store console and rake changes in versions
|
||||||
if defined?(::Rails::Console) || File.basename($PROGRAM_NAME).split(' ').first == 'spring'
|
if defined?(::Rails::Console) || File.basename($PROGRAM_NAME).split(' ').first == 'spring'
|
||||||
PaperTrail.whodunnit = "console-#{`whoami`.strip}"
|
PaperTrail.whodunnit = "console-#{`whoami`.strip}"
|
||||||
elsif File.basename($PROGRAM_NAME) == "rake"
|
elsif File.basename($PROGRAM_NAME) == 'rake'
|
||||||
# rake username does not work when spring enabled
|
# rake username does not work when spring enabled
|
||||||
PaperTrail.whodunnit = "rake-#{`whoami`.strip} #{ARGV.join ' '}"
|
PaperTrail.whodunnit = "rake-#{`whoami`.strip} #{ARGV.join ' '}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue