>
> resources :posts, param: :slug
FWIK this just changes the name of the parameter passed to the controller,
so if you write post_path(Post.first) you will have a request like
/posts/#{post.to_param} but in the controller instead of have param[:id]
you have param[:slug]
--
Maurizio De
I have to say that Rails is great. 5.1 introduces a wonderful feature for
my need: direct
http://edgeapi.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/CustomUrls.html#method-i-direct
Now in config/routes.rb I can write:
# Content model includes FriendlyId, so
Hello,
I have never found a good solution for the following problem. I have the
usual structure:
resources :contents
namespace :admin do
resources :contents
end
When I call content_path(content) I want the id to be the slug of the
content, while when I call admin_content_path(content) I
Hello,
I just almost completed this project:
http://mdesantis.github.io/ruby-rails-documentations/
It provides Ruby and Ruby on Rails documentations merged together, like
railsapi.com used to do (it is online no more).
Feel free to share your opinions about it.
Cheers
--
You received this
Hi!
I'm trying to develop a web chat (like the facebook one, but much
simpler) that works inside Rails 3, and so I'm inquiring about the
methods used for this scope. I had some success applying this guide
http://www.web2media.net/laktek/2010/02/16/building-real-time-web-apps-with-rails3/
, so now
Tim Shaffer wrote:
It's possible you have a style that is overwriting the rows and cols
attribute.
For my experience, it's better to not use rows and cols for dimensioning
textareas, because the dimensions of the textarea will depend from the
dimensions of the row and of the column, that rely
6 matches
Mail list logo