Ruby on Rails Friday, September 21, 2018

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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
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.

No comments:

Post a Comment