Created
April 19, 2017 06:15
-
-
Save sevenseacat/fdf239bdc572a5c29776483f3f71985d 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
class Tour < ApplicationRecord | |
# This is used when generating urls, ie. tour_path(@tour) will give you "/tours/#{@tour.to_param}" | |
def to_param | |
tour_id # The field name that gives you 'e4Hqh8jTTcCrvQ3kH26Mtd7a' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm doing that in the tour controller