Is there a way I could retrieve created_at
value from the Database in Rails?
The table has columns like ticket_created
, ticket_updated
. By default a created_at
column is also included. If I try doing:
@tickets = Ticket.find(:all)
for ticket in @tickets
puts ticket.created_at
end
the above code is returning ticket_created
instead of the automatically generated created_at
The sample database row looks like this.
id | title | link | key | summary | priority | status | created_at | updated_at | ticket_created | ticket_updated