condition for persistance if resource.avatar in a slim view

6 views
Skip to first unread message

fugee ohu

unread,
Mar 26, 2018, 7:44:31 PM3/26/18
to Ruby on Rails: Talk
  .avatar
    - if resource.avatar
      .control-group
        .controls
          = image_tag resource.avatar.thumb_url

This code causes an argument error on the last line "nil is not a valid asset source"
Reply all
Reply to author
Forward
0 new messages