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=>"tick
in your path are you sending the project object as params?
2011/12/1 Vogon Primo
> Frederick Cheung wrote in post #1034554:
> > On Dec 1, 11:28am, Vogon Primo wrote:
> >> POST /projects/:project_id/tickets(.:format)
> >>
> >> It invokes the show action and not the index action. Why?
>
Frederick Cheung wrote in post #1034554:
> On Dec 1, 11:28am, Vogon Primo 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 but it has
On Dec 1, 11:28 am, Vogon Primo 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", :controller=
yes, it will work
On Jan 10, 1:34 am, JD wrote:
> On Jan 9, 6:14 pm, Frederick Cheung
> wrote:
>
> > On Jan 9, 1:10 pm, JD 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 tha
On Jan 9, 6:14 pm, Frederick Cheung
wrote:
> On Jan 9, 1:10 pm, JD 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
Well I've figured this one out so no worries.
On Jan 9, 1:10 pm, JD 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 and have name
On Jan 9, 1:10 pm, JD 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
simply by saying
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
On Aug 28, 2:43 pm, Himanshu Prakash 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:
> Product
Another tip is to run "rake routes" to see all the available routes.
On Aug 28, 9:26 am, James Englert 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:
>
> map.resources :*proj
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.hom
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*, :collection
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.
I tend to think of it as adding them 'inline'
As Ro
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 Fr
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",
:contro
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 => { :
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 rou
18 matches
Mail list logo