daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Article < ActiveRecord::Base
  2.  
  3.   has_permalink :name
  4.  
  5.   def to_param
  6.     permalink
  7.   end
  8. end
  9.  
  10. class ArticlesController < ApplicationController
  11.  
  12.   def show
  13.     @article = Article.find_by_permalink(params[:id])
  14.   end
  15. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top