Skip to content

Commit

Permalink
add to_param for correct URL generation
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesjove committed Jan 30, 2015
1 parent 6524938 commit 637113e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/fixtures/poro.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def id
@attributes[:id] || @attributes['id'] || object_id
end

def to_param
id
end

def method_missing(meth, *args)
if meth.to_s =~ /^(.*)=$/
@attributes[$1.to_sym] = args[0]
Expand Down

0 comments on commit 637113e

Please sign in to comment.