Split Status based on Time Condition

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Split Status based on Time Condition

Stephanie_Snowflake
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?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/59f2c76a-1a21-44e4-8428-756754812a13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.