rails created_at value is null

133 Views Asked by At
<%= Case.all.count() %> cases

Giving me 300 cases

<% Case.order("id DESC").each do |c| %>
        <%= c.created_at %>
<% end %>

this giving me nothing

I added this migration so I can edit the created_at value

class AddTimestampsToCase < ActiveRecord::Migration
  def change
    add_column :cases, :created_at, :datetime 
  end
end

but now I can't get the real created_at value. I want to restore the created_at value Please advice! Thanks

0

There are 0 best solutions below