Split Status based on Time Condition

9 views
Skip to first unread message

Stephanie_Snowflake

unread,
Sep 21, 2018, 12:51:06 PM9/21/18
to Ruby on Rails: Talk
enum status: [ :in_progress, :on_hold, :cancelled, :shipped ]

I need to split :shipped based on before or after one year from the current date.

enum status: [ :in_progress, :on_hold, :cancelled, :shipped, :archive_shipped ]

how to I write out the scope for the condition? Or should it be written as a self.phase method?

Reply all
Reply to author
Forward
0 new messages