rubyforgood / habitat_humanity

MIT License
6 stars 13 forks source link

add custom view that allows for datetime in the shift_events index #121

Closed kctrlv closed 7 years ago

kctrlv commented 7 years ago

Resolves #114

The way the Administrate gem renders DateTime objects by default is as Dates.

source

I referenced the Administrate docs to auto-generate a custom view, and modified the partial on lines 59-63 to override that default behavior for DateTimes. The formatting can be altered on line 62 as desired.

jcasimir commented 7 years ago

It's pretty interesting how the generator puts comments in the template. I've never seen that done before, but have definitely encountered the scenario where I have a partial and I'm not sure where it's being used. Looks like good work!

bjmllr commented 7 years ago

Thank you!