1
0

Removed Measurement 'hidden' attribute

This commit is contained in:
cryptogopher 2019-12-27 01:48:22 +01:00
parent 2dcc750355
commit 056d3b150d
3 changed files with 1 additions and 8 deletions

View File

@ -23,7 +23,6 @@ class Measurement < ActiveRecord::Base
after_initialize do
if new_record?
self.hidden = false if self.hidden.nil?
self.taken_at = Time.now
end
end
@ -43,10 +42,6 @@ class Measurement < ActiveRecord::Base
.find_or_create_by(name: self.name, domain: ColumnView.domains[:measurement])
end
def toggle_hidden!
self.toggle!(:hidden)
end
def taken_at_date
self.taken_at.getlocal
end

View File

@ -11,8 +11,7 @@
<tbody>
<% @measurements.each do |m| %>
<% next if m.new_record? %>
<tr id="measurement-<%= m.id %>"
class="primary measurement <%= 'hidden' if m.hidden %>">
<tr id="measurement-<%= m.id %>" class="primary measurement">
<td class="date unwrappable"><%= format_datetime(m) %></td>
<td class="name">
<div style="float:left;">

View File

@ -62,7 +62,6 @@ class CreateSchema < ActiveRecord::Migration
t.references :project
t.string :name
t.references :source
t.boolean :hidden
t.timestamp :taken_at
t.timestamps null: false
end