Skip to content

Instantly share code, notes, and snippets.

@domagude

domagude/posts_helper.rb

Last active Nov 12, 2017
Embed
What would you like to do?
...
def contact_user_partial_path
if user_signed_in?
@post.user.id != current_user.id ? 'posts/show/contact_user' : 'shared/empty_partial'
else
'posts/show/login_required'
end
end
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment