I am adding a new model to rails_admin. The list page displays the datetime fields correctly, even without any configuration. But the detail page (show) for this object does not display data. How to configure rails_admin to display date and time fields on the display page?
Model File: alert_recording.rb:
class AlertRecording < ActiveRecord::Base
attr_accessible :user_id, :admin_id, :message, :sent_at, :acknowledged_at, :created_at, :updated_at
end
Rails_admin Initialization File:
...
config.included_models = [
AlertRecording
]
...
config.model AlertRecording do
field :sent_at, :datetime
field :acknowledged_at, :datetime
field :message
field :user
field :admin
field :created_at, :datetime
field :updated_at, :datetime
list do; end
show do; end
end
What is the right way to configure datetime fields so that I see them in a view?
source
share