As per the rails_admin github documentation here, for my rails model I have set default value for paramters as:
rails_admin do
edit do
field :active do
default_value true
end
field :loyalty_tier do
default_value 1
end
end
end
However, when I try to set the value for a datetime
attribute, it is not reflecting on the corresponding admin panel view as expected.
The following code snippet:
rails_admin do
edit do
field :effective_start do
default_value DateTime.now
end
field :effective_end do
default_value {DateTime.now + 99.years}
end
end
end
renders the view as:
which does not render the time part of DateTime, as visible. How exactly to set the default value for a datetime field in rails_admin ?