ruby-on-rails
Rails Route based on something different than ID
So currently I have something like /users/1/ when I want to view a user profile. How can I go through routes.r开发者_如何学编程b to change that to /user/chiggins/ where chiggins is a unique username?Y[详细]
2023-04-13 09:17 分类:问答How do I stop delayed_job if I'm running it with the -m "monitor" option?
How do I stop delayed_job if I\'m running it with the -m \"monitor\" option? The processes keep getting restarted![详细]
2023-04-13 09:14 分类:问答overwrite authenticate_user! in devise gem
I\'m overwriting my au开发者_如何学JAVAthenticate method in my application controller def authenticate_worker![详细]
2023-04-13 08:56 分类:问答Is there any specific article about every options of REST in rails?
I wanna use rails REST so: resources :questions I wanna add a route /questions/query_by_student so: resources :questions, :collection => { :query_by_student => :get }[详细]
2023-04-13 08:56 分类:问答rails + carrierwave file uploading form arbitrary file fields count
I need to have from 1 to 15 file fields for photos. Now I\'m uploading files with carrierwave gem building every photo object in my controller like: N.times { @car.photos.build } and then provide N f[详细]
2023-04-13 08:56 分类:问答Rails/ActiveRecord: joining first association only
class Session has_many :events end class Event belongs_to :session # r开发者_StackOverfloweferrer column[详细]
2023-04-13 08:55 分类:问答How to configure config.ru to get Resque to run on Heroku?
I have the following in my config.ru file and which crashes Heroku with the error underneath it. require ::File.expand_path(\'../config/environment\',__FILE__)[详细]
2023-04-13 08:38 分类:问答How to pass a lambda to link_to
I would like to use lambda as a parameter for link_to for the code below: edit.html.erb <h2>Edit customer info</h2>[详细]
2023-04-13 08:10 分类:问答Best RoR approach for CURLing
I have the following piece of code in PHP. I\'m looking for the best way to convert it to Ruby. I\'ve looked at a few ap开发者_开发百科proaches, including open-uri and the curb and wrapper curb-fu lib[详细]
2023-04-13 08:03 分类:问答rails 2, why is this controller action returning a nil.to_sym
The following is my show action: def show @category = Category.find_by_url_name(params[:id]) @brands = @category.brands[详细]
2023-04-13 07:56 分类:问答