On Dec 1, 11:28 am, Vogon Primo li...@ruby-forum.com wrote:
Hi all,
In a sample project, I have a nested resource called ticket, and parent
resource called project.
rake routes:
...
project_tickets GET /projects/:project_id/tickets(.:format)
{:action=index,
Frederick Cheung wrote in post #1034554:
On Dec 1, 11:28am, Vogon Primo li...@ruby-forum.com wrote:
POST /projects/:project_id/tickets(.:format)
It invokes the show action and not the index action. Why?
It's also doing weird stuff because it hasn't picked a project_id from
the url
in your path are you sending the project object as params?
2011/12/1 Vogon Primo li...@ruby-forum.com
Frederick Cheung wrote in post #1034554:
On Dec 1, 11:28am, Vogon Primo li...@ruby-forum.com wrote:
POST /projects/:project_id/tickets(.:format)
It invokes the show action and
Vogon Primo wrote in post #1034547:
Hi all,
In a sample project, I have a nested resource called ticket, and parent
resource called project.
rake routes:
...
project_tickets GET/projects/:project_id/tickets(.:format)
{:action=index, :controller=tickets}
On Jan 9, 1:10 pm, JD jdg@gmail.com wrote:
Hello all,
I'm relatively new to rails and have been doing ok with it but I have
run into an issue that I'm sure has a really easy solution that I just
can't seem to see.
Do you want admin_carriers_path? You can probably simplify things
Well I've figured this one out so no worries.
On Jan 9, 1:10 pm, JD jdg@gmail.com wrote:
Hello all,
I'm relatively new to rails and have been doing ok with it but I have
run into an issue that I'm sure has a really easy solution that I just
can't seem to see.
Basically I have an app
On Jan 9, 6:14 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On Jan 9, 1:10 pm, JD jdg@gmail.com wrote:
Hello all,
I'm relatively new to rails and have been doing ok with it but I have
run into an issue that I'm sure has a really easy solution that I just
can't seem to
yes, it will work
On Jan 10, 1:34 am, JD jdg@gmail.com wrote:
On Jan 9, 6:14 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On Jan 9, 1:10 pm, JD jdg@gmail.com wrote:
Hello all,
I'm relatively new to rails and have been doing ok with it but I have
run into an issue
On Aug 28, 2:43 pm, Himanshu Prakash vision2...@gmail.com wrote:
Hi John,
try this approach:
in the Product class add this function-
require 'uri'
def self.find_custom arg
object = self.new
object.id = URI.escape(arg)
object
end
and in the controller try calling as:
On Aug 28, 2009, at 2:02 PM, John Mcleod wrote:
Since I've been learning rails, I thought that routes are the
linking of the Controller Object to their Action method.
When you set up RESTful routing, you need to add custom or named
routes after the default 7.
To set up custom or named
On Aug 28, 2009, at 11:34 AM, John Mcleod wrote:
Hello all,
Here's a newbie question (4 weeks and counting).
My routes.rb is as below.
map
.resources :projects, :departments, :users, :admins, :imports, :notes
#Below is route in question
map.resources :projects, :collection = { :view_all
Since I've been learning rails, I thought that routes are the linking of
the Controller Object to their Action method.
When you set up RESTful routing, you need to add custom or named routes
after the default 7.
To set up custom or named routes, you use map.connect path/to/view,
:controller =
Hi John,
try this approach:
in the Product class add this function-
require 'uri'
def self.find_custom arg
object = self.new
object.id = URI.escape(arg)
object
end
and in the controller try calling as:
Product.find_custom(params[:id]).view_all
just try it, and let me know.
On
ROR will attempt to find routes from the top of the file first and then move
on to the rest of the file. It would seem that you have listed projects
twice:
map.resources :*projects*, :departments, :users, :admins, :imports, :notes
#Below is route in question
map.resources :*projects*,
John Mcleod wrote:
Hello all,
Here's a newbie question (4 weeks and counting).
My routes.rb is as below.
map.resources :projects, :departments, :users, :admins, :imports, :notes
#Below is route in question
map.resources :projects, :collection = { :view_all = :get }
map.home '',
Another tip is to run rake routes to see all the available routes.
On Aug 28, 9:26 am, James Englert englert.ja...@gmail.com wrote:
ROR will attempt to find routes from the top of the file first and then move
on to the rest of the file. It would seem that you have listed projects
twice:
On Oct 13, 10:30 am, gdiazl [EMAIL PROTECTED] wrote:
Hello,
Just a single problem i can't solve. The scenario...
I have a controller called places but i don't want to link the users
to /places/whatever, i want something like /no/whatever. How to
achieve this?
I have in my routes.rb:
17 matches
Mail list logo