Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to chain try() and scoped to_s() in Rails?
- @model.try(:date)
- @model.try(:date).try(:to_s)
- @model.try(:date).try(:to_s(:long))
- @model.try(:date).try(:to_s).try(:long)
- Person.try(:find, 1)
- @model.try(:date).try(:to_s, :long)
- @model.try(:date).try(:to_s(:long))
- @model.try(:date).try(:to_s).try(:long)
- @model.date.to_s(:long) rescue nil
- l @model.date, format: :long rescue nil
Add Comment
Please, Sign In to add comment