Top "Rails-routing" questions

The component of the Ruby on Rails framework responsible for mapping between HTTP requests and application resources (including static files and controller actions).

Can Rails Routing Helpers (i.e. mymodel_path(model)) be Used in Models?

Say I have a Rails Model called Thing. Thing has a url attribute that can optionally be set to a …

ruby-on-rails rails-routing helpermethods
rails get app root/base url

In my app I have a few APIs that under api domain. Now in one of the API I want …

ruby-on-rails ruby-on-rails-3 rails-routing url-for
Routing error - uninitialized constant

I could not fix this in Rails 3.2.12, maybe I am missing something. config/routes.rb get "home/index" root :to =&…

ruby-on-rails ruby rails-routing
Adding an action to an existing controller (Ruby on Rails)

I am new to Ruby on Rails, I have completed the Blog Tutorial. I am now trying to add an …

ruby-on-rails ruby rails-routing
Routing with an optional parameter

I added in the route file: map.show_book "/show_book/:name/year/:year", :controller => "book", :action => "show_…

ruby-on-rails routing rails-routing ruby-on-rails-2
How to add custom routes to resource route

I have an invoices_controller which has resource routes. Like following: resources :invoices do resources :items, only: [:create, :destroy, :update] …

ruby-on-rails ruby-on-rails-3 rails-routing
Rails Responds with 404 on CORS Preflight Options Request

I'm creating a set of services using Rails 4, which I am consuming with a JavaScript browser application. Cross-origin GETS are …

ruby-on-rails-4 xmlhttprequest cors rails-routing http-method
How to get the current route in rails

I am building some rails sample application in which I am having two models User and Projects. Association between both …

ruby-on-rails ruby ruby-on-rails-3 rails-routing
Rails controller action without a view

I just want to do a rails action without a view. In my 'routes.rb' resources :pictures do member do …

ruby-on-rails rails-routing
Rails Routing Error? 'No route matches'

So I keep running into the following error: No route matches {:action=>"show", :controller=>"users"} I tried running …

ruby-on-rails rails-routing