On Mon, Oct 8, 2012 at 8:58 AM, Pascal Hurni <hur...@gmail.com> wrote: > > There's nothing wrong with params[:id] containing "rails-tutorial", this > is a controller concern, the semantic is: "We have a request to find a > resource identified with params[:id]". Nowhere in Rails we say that this id > IS an ActiveRecord record's id attribute. Of course for convenience and > when using the whole stack, this last statement is what we want, but it's > our controller code that controls this semantic. >
Technically it's not wrong, but when it comes to readability, it's much better to say params[:slug] or params[:name] if that's what it is. I would like to have the ability to set the name of that param. Anyone from core team cares enough to accept/reject this idea? -- Piotr Sarnacki http://piotrsarnacki.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.