Skip to content

Commit 076cc7a

Browse files
authored
Merge pull request #9702 from Fryguy/remove_unnecessary_ivars
Remove unnecessary ivars
2 parents 97a499b + d4ac0fe commit 076cc7a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/helpers/ops_helper.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ def row_data(label, value)
2222
end
2323

2424
def database_details
25-
@database_details = ActiveRecord::Base.configurations.configs_for(:env_name => Rails.env).first.configuration_hash
26-
@database_display_name =
27-
if @database_details[:host].in?([nil, "", "localhost", "127.0.0.1"])
25+
details = ActiveRecord::Base.configurations.configs_for(:env_name => Rails.env).first.configuration_hash
26+
display_name =
27+
if details[:host].in?([nil, "", "localhost", "127.0.0.1"])
2828
_("Internal Database")
2929
else
3030
_("External Database")
3131
end
3232
@data = {:title => _('Basic Information')}
3333
@data[:rows] = [
34-
row_data(_('Name'), @database_display_name),
35-
row_data(_('Hostname'), @database_details[:host]),
36-
row_data(_('Database name'), @database_details[:database]),
37-
row_data(_('Username'), @database_details[:username])
34+
row_data(_('Name'), display_name),
35+
row_data(_('Hostname'), details[:host]),
36+
row_data(_('Database name'), details[:database]),
37+
row_data(_('Username'), details[:username])
3838
]
3939
end
4040

0 commit comments

Comments
 (0)