Created
April 7, 2016 14:20
-
-
Save djgraham/82424d585bb16e50ddf46802d3e48368 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def polymorphicable_path(polymorphicable, action: '') | |
url_for( | |
controller: polymorphicable.class.name.tableize, | |
action: action, | |
id: polymorphicable.id, | |
only_path: true | |
) | |
end | |
polymorphicable_path(Task.first.taskable, 'edit') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment