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
|
||||
|
||||
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
|
||||
selected = quick_list.map(&:second).include?(selected) ? '' : selected
|
||||
|
||||
all_options = options_for_select([['---', '---']] + all_sorted_truncated,
|
||||
{ selected: selected, disabled: ['---'] })
|
||||
selected: selected, disabled: ['---'])
|
||||
quick_options + all_options
|
||||
end
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
class Builder::XmlMarkup
|
||||
def epp_head
|
||||
instruct!
|
||||
epp(
|
||||
'xmlns' => 'https://epp.tld.ee/schema/epp-ee-1.0.xsd',
|
||||
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
||||
'xsi:schemaLocation' => 'lib/schemas/epp-ee-1.0.xsd'
|
||||
) do
|
||||
yield
|
||||
module Builder
|
||||
class XmlMarkup
|
||||
def epp_head
|
||||
instruct!
|
||||
epp(
|
||||
'xmlns' => 'https://epp.tld.ee/schema/epp-ee-1.0.xsd',
|
||||
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
||||
'xsi:schemaLocation' => 'lib/schemas/epp-ee-1.0.xsd'
|
||||
) do
|
||||
yield
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ end
|
|||
# Store console and rake changes in versions
|
||||
if defined?(::Rails::Console) || File.basename($PROGRAM_NAME).split(' ').first == 'spring'
|
||||
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
|
||||
PaperTrail.whodunnit = "rake-#{`whoami`.strip} #{ARGV.join ' '}"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue