Revision d9a2ebac
Added by Ohad Levy almost 12 years ago
- ID d9a2ebac6e9ec0082e60265b794f54a29a1f7e65
app/helpers/puppetclasses_helper.rb | ||
---|---|---|
def host_counter klass
|
||
# workaround for sqlite bug
|
||
# https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4544-rails3-activerecord-sqlite3-lost-column-type-when-using-views#ticket-4544-2
|
||
@counter[klass.id.to_s] || @counter[klass.id.to_i] || 0
|
||
@host_counter[klass.id.to_s] || @host_counter[klass.id.to_i] || 0
|
||
rescue
|
||
"N/A"
|
||
end
|
Also available in: Unified diff
[SQL optimizations] - many small optimizations
This is one of a few patches aim to improve Foreman performance