Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Correct missing post instance variable in the docs. (ht: aklein-dex)

  • Loading branch information...
commit e4a6d90728fbf90cd5a2e66bcb1b68c2cb1a4b97 1 parent 0d168b8
@parndt parndt authored
Showing with 4 additions and 4 deletions.
  1. +3 −3 Guide.rdoc
  2. +1 −1  lib/friendly_id/history.rb
View
6 Guide.rdoc
@@ -114,8 +114,8 @@ store them in a field in your model. By default, this field must be named
+:slug+, though you may change this using the
{FriendlyId::Slugged::Configuration#slug_column slug_column} configuration
option. You should add an index to this column, and in most cases, make it
-unique. Do not make the column unique in case you wish to scope the slug
-(more on this later). You may also wish to constrain it to NOT NULL, but this
+unique. Do not make the column unique in case you wish to scope the slug
+(more on this later). You may also wish to constrain it to NOT NULL, but this
depends on your app's behavior and requirements.
=== Example Setup
@@ -316,7 +316,7 @@ method.
...
def find_post
- Post.find params[:id]
+ @post = Post.find params[:id]
# If an old id or a numeric id was used to find the record, then
# the request path will not match the post_path, and we should do
View
2  lib/friendly_id/history.rb
@@ -43,7 +43,7 @@ class PostsController < ApplicationController
...
def find_post
- Post.find params[:id]
+ @post = Post.find params[:id]
# If an old id or a numeric id was used to find the record, then
# the request path will not match the post_path, and we should do
Please sign in to comment.
Something went wrong with that request. Please try again.