Answers for "how to change created_at format with javascript rails"

0

how to change created_at format with javascript rails

You can override the created_at on the corresponding model

class Model < ActiveRecord::Base
  def created_at
    attributes['created_at'].strftime("%m/%d/%Y %H:%M")
  end
end
Posted by: Guest on December-19-2020

Code answers related to "how to change created_at format with javascript rails"

Code answers related to "Javascript"

Browse Popular Code Answers by Language