new order controller to view orders, lots of bugfixes
[smr.git] / gui / app / models / comment.rb
blobaa1fe0f3859be327fe717a2ddca6253747d5c57e
2 # This file is part of SMR.
4 # SMR is free software: you can redistribute it and/or modify it under the
5 # terms of the GNU General Public License as published by the Free Software
6 # Foundation, either version 3 of the License, or (at your option) any later
7 # version.
9 # SMR is distributed in the hope that it will be useful, but WITHOUT ANY
10 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License along with
14 # SMR.  If not, see <http://www.gnu.org/licenses/>.
16 class Comment < ActiveRecord::Base
17         belongs_to :User, :foreign_key=>'id_user'
19     # returns Time object from unix-timestamp in date column
20     def time
21         Time.at(date)
22     end
23 end