Created
June 5, 2010 19:33
-
-
Save jgrau/426926 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
# ofcause action_path doesn't work with this syntax | |
def init_and_slug_redirect | |
@place = Place.published.find(params[:id]) | |
action = self.action_name | |
redirect_to action_path(@place), :status => :moved_permanently unless @place.friendly_id_status.best? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment