Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Article < ActiveRecord::Base
- has_permalink :name
- def to_param
- permalink
- end
- end
- class ArticlesController < ApplicationController
- def show
- @article = Article.find_by_permalink(params[:id])
- end
- end
Add Comment
Please, Sign In to add comment