Notes posted by paul_wittmann
RSS feed
paul_wittmann -
April 2, 2014 - (v4.0.2)
1 thank
link_to_if when URL helpers will throw an exception when condition fails
You can use an array to build a URL instead of a URL helper (e.g. edit_admin_user_path(event.user), which would fail when an event has no user:
link_to_if event.user, event.user_name, [:edit, :admin, event.user]