Skip to content

Commit

Permalink
Correct missing post instance variable in the docs. (ht: aklein-dex)
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Sep 14, 2012
1 parent 0d168b8 commit e4a6d90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Guide.rdoc
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/friendly_id/history.rb
Expand Up @@ -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
Expand Down

0 comments on commit e4a6d90

Please sign in to comment.