Browse files

Add some details to the README file

  • Loading branch information...
1 parent 935b80d commit 4cb62b01bcd30f798293bb536ba3f734cb6a95a5 Mark Connell committed Apr 14, 2009
Showing with 28 additions and 3 deletions.
  1. +28 −3 README
@@ -1,13 +1,38 @@
-Introduction goes here.
+acts_as_param is Rails plugin that allows you to parameterize models so that instead of the being used for urls, a custom parameter based on a column name can be specified. Ideal if you don't want to touch Object.to_param for whatever reason!
+acts_as_param will let you do this:
+Updated to work with Rails 2.3.2, installs like any regular rails plugin.
-Example goes here.
+Your model:
+class Biscuit < ActiveRecord::Base
+ acts_as_param :from => :name
+where :from is defining the column name (eg.
+Your controller:
+Replace Biscuit.find() with .find_by_param()
+def show
+ @biscuit = Biscuit.find_by_param(params[:id])
+ respond_to do |format|
+ format.html # show.html.erb
+ end
-Copyright (c) 2007 [name of plugin creator], released under the MIT license
+Copyright (c) 2007-2009 Rubaidh Ltd, released under the MIT license

0 comments on commit 4cb62b0

Please sign in to comment.