rails-routing
Managing routes with rails
I want to be able to better understand rails routes file, but I can\'t figure it out by myself since it\'s too complex.[详细]
2023-01-31 03:26 分类:问答Is there a better way to do with_options in Rails 3 routes?
Here are my Rails 2 routes: map.with_options :controller => \'foo\', :conditions => { :method => :post } do |foo|[详细]
2023-01-30 15:41 分类:问答Rails 3 link_to (:method => :delete) not working
I\'m having trouble with my verbs in Rails... viewing a page for a resource (Dog) which has_many (Fleas). Embedded in dog\'s show.html.haml is a call to render @dog.fleas which automatically(?) finds[详细]
2023-01-28 07:51 分类:问答Rails: RESTful resources: Worth using or inflexible/overrated?
I\'ve been messing about in rails the past 2 months and so far everything\'s going well - but there\'s one area I\'m a little doubtful on.[详细]
2023-01-26 03:57 分类:问答Customizing one route in Rails 3 resources function
By default the resources command generates the url for new action as {model}/new. Sending a path_names = {} hash doesn\'t change the base {model} according to the documentation. How would I go about r[详细]
2023-01-25 06:05 分类:问答Why is the route not finding the the decimal
Ok so i have an application that i use this jquery $(\"#band_events\").load(\"/load_events/\"+ escape($(\'#request_artist\').val()), successCallback );[详细]
2023-01-20 14:47 分类:问答Problem with same resource, accessible via two routes
I\'m developing simple image sharing site to train my ruby-on-rails-fu. I have following resources in my config/routes.rb file.[详细]
2023-01-20 02:44 分类:问答Overriding a resource route to / (root) in Rails3: not changing the path helper?
I am quite new to Rails3, I basically created a subscribers scaffolding, I only want my app to respond to new and create actions.[详细]
2023-01-17 09:53 分类:问答/session instead of /login when login attempt failed
sessions_controller.rb def create if user = User.authenticate(params[:login], params[:password]) session[:user_id] = user.id[详细]
2023-01-17 08:40 分类:问答Rails: how to create a default route for specific object
I have a User class andmap.resources :users in my routes. If I create a link link_to @user.name, @user It will somehow automatically create a link to /users/3 where 3 is an ID of the user.[详细]
2023-01-16 22:16 分类:问答