Removed Measurement 'hidden' attribute
This commit is contained in:
parent
2dcc750355
commit
056d3b150d
@ -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
|
||||
|
@ -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;">
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user