Re: [Rails-core] URL ID

2012-07-08 Thread Richard Schneeman
Agreed, If you want custom slugs use something like https://github.com/norman/friendly_id and then you can just forego the id in the url all together. On Monday, July 9, 2012 at 1:18 AM, Ryan Bigg wrote: > Very limited use-case. Can't see the point of it. > > -1 > > On Monday, 9 July 2012

Re: [Rails-core] URL ID

2012-07-08 Thread Ryan Bigg
Very limited use-case. Can't see the point of it. -1 On Monday, 9 July 2012 at 3:58 PM, angelo capilleri wrote: > Many users try to overwrite the to_param method of AR to add more > expressivness and value of Seo to the url using something like the > following: > > def to_param > id.to_s + t

[Rails-core] URL ID

2012-07-08 Thread angelo capilleri
Many users try to overwrite the to_param method of AR to add more expressivness and value of Seo to the url using something like the following: def to_param id.to_s + title. parameterize + '-' + author. parameterize end That generate url like that: http://host/books/10-goodbook-guest Th

[Rails-core] ActiveModel::ValueObject

2012-07-08 Thread Wojciech Mach
Hi guys Seeing `composed_of` removed I put together a quick proof-of-concept ValueObject implementation on top of ActiveModel and ActiveRecord `serialize`. https://gist.github.com/3070184 Features: - VO's are immutable - VO's are identified by their attributes - VO's can be conveniently create