Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #format #javascript #rails
ADD COMMENT
Topic
Name
8+9 =