Redirection problem

Hello,
I’m developping an application using rails 2.3.5 and ruby 1.8.7 and
I’m having a problem I never had before with ruby on rails.

The redirect and link_to functions create me urls of this type:
http://pizarro.com.mx/products?id=1
when it should be:
http://pizarro.com.mx/products/1

I can’t figure out why suddenly the id parameter handling changed…my
routes.rb file is the following one:
map.root :controller => “pizarro”, :action => “home”, :id => 0
map.connect ‘pizarro’, :controller => ‘pizarro’, :action =>
“home”, :id => 0
map.connect ‘:controller/:action’
map.connect ‘:controller/:action/:id’
map.connect ‘:controller/:action/:id.:format’

As you can see it precises the ‘:controller/:action/:id’ url
type…the thing is that with this problem almost all my site
navigation is not working, I keep on having redirections errors…

Here is an exemple of the way I’m creating the links:
Redirection: redirect_to :controller => “pizarro”, :action =>
“home”, :id => 0
Link to: link_to :controller => “pizarro”, :action => “home”, :id =>
0

I’ve been using ruby on rails for about a year now and never faced
this issue.

Any tip or idea? It’s pretty urgent…Thanks a lot!

CiriusMex wrote:

Hello,
I’m developping an application using rails 2.3.5 and ruby 1.8.7 and
I’m having a problem I never had before with ruby on rails.

The redirect and link_to functions create me urls of this type:
http://pizarro.com.mx/products?id=1
when it should be:
http://pizarro.com.mx/products/1

I can’t figure out why suddenly the id parameter handling changed…my
routes.rb file is the following one:
map.root :controller => “pizarro”, :action => “home”, :id => 0
map.connect ‘pizarro’, :controller => ‘pizarro’, :action =>
“home”, :id => 0

Why do you need an id on your root path?

map.connect ‘:controller/:action’
map.connect ‘:controller/:action/:id’
map.connect ‘:controller/:action/:id.:format’

As you can see it precises the ‘:controller/:action/:id’ url
type…the thing is that with this problem almost all my site
navigation is not working, I keep on having redirections errors…

Here is an exemple of the way I’m creating the links:
Redirection: redirect_to :controller => “pizarro”, :action =>
“home”, :id => 0
Link to: link_to :controller => “pizarro”, :action => “home”, :id =>
0

You should probably be using link_to root_path.

I’ve been using ruby on rails for about a year now and never faced
this issue.

Any tip or idea? It’s pretty urgent…Thanks a lot!

Saying it’s urgent will unfortunately not get people to help any faster.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Why do you need an id on your root path?
I don’t need it but don’t think it’s the problem here…My problem is
that the link created for exemple using <%= link_to “Show
product”, :controller => “products”, :action =>
“showProductDetails”, :id => 1 %> should give me this url “http://
pizarro.com.mx/products/1” and not “http://pizarro.com.mx/products?
id=1”
as precised in my routes.rb with the line “map.connect
‘:controller/:action/:id’”

You should probably be using link_to root_path.
You’re right about that but it doesn’t solve the problem for the other
urls

Saying it’s urgent will unfortunately not get people to help any faster.
Yeah of course, it wasn’t the idea neither…

Thanks for your help :slight_smile:

CiriusMex wrote:

Why do you need an id on your root path?
I don’t need it but don’t think it’s the problem here…My problem is
that the link created for exemple using <%= link_to “Show
product”, :controller => “products”, :action =>
“showProductDetails”, :id => 1 %> should give me this url “http://
pizarro.com.mx/products/1” and not “http://pizarro.com.mx/products?
id=1”
as precised in my routes.rb with the line “map.connect
‘:controller/:action/:id’”

You should probably be using link_to root_path.
You’re right about that but it doesn’t solve the problem for the other
urls

Quite right. What’s the output from rake routes?

Saying it’s urgent will unfortunately not get people to help any faster.
Yeah of course, it wasn’t the idea neither…

Thanks for your help :slight_smile:

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Still no idea? I must admit I don’t have but maybe you can see
something…

CiriusMex wrote:

Still no idea? I must admit I don’t have but maybe you can see
something…

It hasn’t even been 24 hours since your last post. Be patient.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Right, sorry, I’m just going mad trying to figure this out :wink:

Quite right. What’s the output from rake routes?

Ok, it’s quite big so I hope it won’t be anoying, I put all of it:
As a reference, the urls “redirect_to :controller =>
‘pizarro’, :action => ‘logout’, :id => 0” and “redirect_to :controller
=> ‘pizarro’, :action => ‘dashboardAdministrator’, :id => 0” don’t
work.
I must say I learned to use ruby by myself so even if I’ve been using
it for a year now there’s still lots of things I don’t know about the
language and things I don’t use that well…any information is
welcome :slight_smile:

                announces GET    /announces

(.:format)
{:action=>“index”, :controller=>“announces”}
POST /announces
(.:format)
{:action=>“create”, :controller=>“announces”}
new_announce GET /announces/new
(.:format)
{:action=>“new”, :controller=>“announces”}
edit_announce GET /announces/:id/edit
(.:format) {:action=>“edit”, :controller=>“announces”}
announce GET /announces/:id
(.:format)
{:action=>“show”, :controller=>“announces”}
PUT /announces/:id
(.:format)
{:action=>“update”, :controller=>“announces”}
DELETE /announces/:id
(.:format)
{:action=>“destroy”, :controller=>“announces”}
banners_images GET /banners_images
(.:format)
{:action=>“index”, :controller=>“banners_images”}
POST /banners_images
(.:format)
{:action=>“create”, :controller=>“banners_images”}
new_banners_image GET /banners_images/new
(.:format)
{:action=>“new”, :controller=>“banners_images”}
edit_banners_image GET /banners_images/:id/edit
(.:format) {:action=>“edit”, :controller=>“banners_images”}
banners_image GET /banners_images/:id
(.:format)
{:action=>“show”, :controller=>“banners_images”}
PUT /banners_images/:id
(.:format)
{:action=>“update”, :controller=>“banners_images”}
DELETE /banners_images/:id
(.:format)
{:action=>“destroy”, :controller=>“banners_images”}
banners GET /banners
(.:format)
{:action=>“index”, :controller=>“banners”}
POST /banners
(.:format)
{:action=>“create”, :controller=>“banners”}
new_banner GET /banners/new
(.:format)
{:action=>“new”, :controller=>“banners”}
edit_banner GET /banners/:id/edit
(.:format) {:action=>“edit”, :controller=>“banners”}
banner GET /banners/:id
(.:format)
{:action=>“show”, :controller=>“banners”}
PUT /banners/:id
(.:format)
{:action=>“update”, :controller=>“banners”}
DELETE /banners/:id
(.:format)
{:action=>“destroy”, :controller=>“banners”}
configurations GET /configurations
(.:format)
{:action=>“index”, :controller=>“configurations”}
POST /configurations
(.:format)
{:action=>“create”, :controller=>“configurations”}
new_configuration GET /configurations/new
(.:format)
{:action=>“new”, :controller=>“configurations”}
edit_configuration GET /configurations/:id/edit
(.:format) {:action=>“edit”, :controller=>“configurations”}
configuration GET /configurations/:id
(.:format)
{:action=>“show”, :controller=>“configurations”}
PUT /configurations/:id
(.:format)
{:action=>“update”, :controller=>“configurations”}
DELETE /configurations/:id
(.:format)
{:action=>“destroy”, :controller=>“configurations”}
orders_reductions GET /orders_reductions
(.:format)
{:action=>“index”, :controller=>“orders_reductions”}
POST /orders_reductions
(.:format)
{:action=>“create”, :controller=>“orders_reductions”}
new_orders_reduction GET /orders_reductions/new
(.:format)
{:action=>“new”, :controller=>“orders_reductions”}
edit_orders_reduction GET /orders_reductions/:id/edit
(.:format) {:action=>“edit”, :controller=>“orders_reductions”}
orders_reduction GET /orders_reductions/:id
(.:format)
{:action=>“show”, :controller=>“orders_reductions”}
PUT /orders_reductions/:id
(.:format)
{:action=>“update”, :controller=>“orders_reductions”}
DELETE /orders_reductions/:id
(.:format)
{:action=>“destroy”, :controller=>“orders_reductions”}
countries GET /countries
(.:format)
{:action=>“index”, :controller=>“countries”}
POST /countries
(.:format)
{:action=>“create”, :controller=>“countries”}
new_country GET /countries/new
(.:format)
{:action=>“new”, :controller=>“countries”}
edit_country GET /countries/:id/edit
(.:format) {:action=>“edit”, :controller=>“countries”}
country GET /countries/:id
(.:format)
{:action=>“show”, :controller=>“countries”}
PUT /countries/:id
(.:format)
{:action=>“update”, :controller=>“countries”}
DELETE /countries/:id
(.:format)
{:action=>“destroy”, :controller=>“countries”}
reductions_customers GET /reductions_customers
(.:format)
{:action=>“index”, :controller=>“reductions_customers”}
POST /reductions_customers
(.:format)
{:action=>“create”, :controller=>“reductions_customers”}
new_reductions_customer GET /reductions_customers/new
(.:format)
{:action=>“new”, :controller=>“reductions_customers”}
edit_reductions_customer GET /reductions_customers/:id/edit
(.:format) {:action=>“edit”, :controller=>“reductions_customers”}
reductions_customer GET /reductions_customers/:id
(.:format)
{:action=>“show”, :controller=>“reductions_customers”}
PUT /reductions_customers/:id
(.:format)
{:action=>“update”, :controller=>“reductions_customers”}
DELETE /reductions_customers/:id
(.:format)
{:action=>“destroy”, :controller=>“reductions_customers”}
reductions_products GET /reductions_products
(.:format)
{:action=>“index”, :controller=>“reductions_products”}
POST /reductions_products
(.:format)
{:action=>“create”, :controller=>“reductions_products”}
new_reductions_product GET /reductions_products/new
(.:format)
{:action=>“new”, :controller=>“reductions_products”}
edit_reductions_product GET /reductions_products/:id/edit
(.:format) {:action=>“edit”, :controller=>“reductions_products”}
reductions_product GET /reductions_products/:id
(.:format)
{:action=>“show”, :controller=>“reductions_products”}
PUT /reductions_products/:id
(.:format)
{:action=>“update”, :controller=>“reductions_products”}
DELETE /reductions_products/:id
(.:format)
{:action=>“destroy”, :controller=>“reductions_products”}
reductions_tickets GET /reductions_tickets
(.:format)
{:action=>“index”, :controller=>“reductions_tickets”}
POST /reductions_tickets
(.:format)
{:action=>“create”, :controller=>“reductions_tickets”}
new_reductions_ticket GET /reductions_tickets/new
(.:format)
{:action=>“new”, :controller=>“reductions_tickets”}
edit_reductions_ticket GET /reductions_tickets/:id/edit
(.:format) {:action=>“edit”, :controller=>“reductions_tickets”}
reductions_ticket GET /reductions_tickets/:id
(.:format)
{:action=>“show”, :controller=>“reductions_tickets”}
PUT /reductions_tickets/:id
(.:format)
{:action=>“update”, :controller=>“reductions_tickets”}
DELETE /reductions_tickets/:id
(.:format)
{:action=>“destroy”, :controller=>“reductions_tickets”}
accesses_permitions GET /accesses_permitions
(.:format)
{:action=>“index”, :controller=>“accesses_permitions”}
POST /accesses_permitions
(.:format)
{:action=>“create”, :controller=>“accesses_permitions”}
new_accesses_permition GET /accesses_permitions/new
(.:format)
{:action=>“new”, :controller=>“accesses_permitions”}
edit_accesses_permition GET /accesses_permitions/:id/edit
(.:format) {:action=>“edit”, :controller=>“accesses_permitions”}
accesses_permition GET /accesses_permitions/:id
(.:format)
{:action=>“show”, :controller=>“accesses_permitions”}
PUT /accesses_permitions/:id
(.:format)
{:action=>“update”, :controller=>“accesses_permitions”}
DELETE /accesses_permitions/:id
(.:format)
{:action=>“destroy”, :controller=>“accesses_permitions”}
contacts_messages GET /contacts_messages
(.:format)
{:action=>“index”, :controller=>“contacts_messages”}
POST /contacts_messages
(.:format)
{:action=>“create”, :controller=>“contacts_messages”}
new_contacts_message GET /contacts_messages/new
(.:format)
{:action=>“new”, :controller=>“contacts_messages”}
edit_contacts_message GET /contacts_messages/:id/edit
(.:format) {:action=>“edit”, :controller=>“contacts_messages”}
contacts_message GET /contacts_messages/:id
(.:format)
{:action=>“show”, :controller=>“contacts_messages”}
PUT /contacts_messages/:id
(.:format)
{:action=>“update”, :controller=>“contacts_messages”}
DELETE /contacts_messages/:id
(.:format)
{:action=>“destroy”, :controller=>“contacts_messages”}
contacts_threads GET /contacts_threads
(.:format)
{:action=>“index”, :controller=>“contacts_threads”}
POST /contacts_threads
(.:format)
{:action=>“create”, :controller=>“contacts_threads”}
new_contacts_thread GET /contacts_threads/new
(.:format)
{:action=>“new”, :controller=>“contacts_threads”}
edit_contacts_thread GET /contacts_threads/:id/edit
(.:format) {:action=>“edit”, :controller=>“contacts_threads”}
contacts_thread GET /contacts_threads/:id
(.:format)
{:action=>“show”, :controller=>“contacts_threads”}
PUT /contacts_threads/:id
(.:format)
{:action=>“update”, :controller=>“contacts_threads”}
DELETE /contacts_threads/:id
(.:format)
{:action=>“destroy”, :controller=>“contacts_threads”}
contacts_states GET /contacts_states
(.:format)
{:action=>“index”, :controller=>“contacts_states”}
POST /contacts_states
(.:format)
{:action=>“create”, :controller=>“contacts_states”}
new_contacts_state GET /contacts_states/new
(.:format)
{:action=>“new”, :controller=>“contacts_states”}
edit_contacts_state GET /contacts_states/:id/edit
(.:format) {:action=>“edit”, :controller=>“contacts_states”}
contacts_state GET /contacts_states/:id
(.:format)
{:action=>“show”, :controller=>“contacts_states”}
PUT /contacts_states/:id
(.:format)
{:action=>“update”, :controller=>“contacts_states”}
DELETE /contacts_states/:id
(.:format)
{:action=>“destroy”, :controller=>“contacts_states”}
contacts_types GET /contacts_types
(.:format)
{:action=>“index”, :controller=>“contacts_types”}
POST /contacts_types
(.:format)
{:action=>“create”, :controller=>“contacts_types”}
new_contacts_type GET /contacts_types/new
(.:format)
{:action=>“new”, :controller=>“contacts_types”}
edit_contacts_type GET /contacts_types/:id/edit
(.:format) {:action=>“edit”, :controller=>“contacts_types”}
contacts_type GET /contacts_types/:id
(.:format)
{:action=>“show”, :controller=>“contacts_types”}
PUT /contacts_types/:id
(.:format)
{:action=>“update”, :controller=>“contacts_types”}
DELETE /contacts_types/:id
(.:format)
{:action=>“destroy”, :controller=>“contacts_types”}
customers GET /customers
(.:format)
{:action=>“index”, :controller=>“customers”}
POST /customers
(.:format)
{:action=>“create”, :controller=>“customers”}
new_customer GET /customers/new
(.:format)
{:action=>“new”, :controller=>“customers”}
edit_customer GET /customers/:id/edit
(.:format) {:action=>“edit”, :controller=>“customers”}
customer GET /customers/:id
(.:format)
{:action=>“show”, :controller=>“customers”}
PUT /customers/:id
(.:format)
{:action=>“update”, :controller=>“customers”}
DELETE /customers/:id
(.:format)
{:action=>“destroy”, :controller=>“customers”}
orderlines GET /orderlines
(.:format)
{:action=>“index”, :controller=>“orderlines”}
POST /orderlines
(.:format)
{:action=>“create”, :controller=>“orderlines”}
new_orderline GET /orderlines/new
(.:format)
{:action=>“new”, :controller=>“orderlines”}
edit_orderline GET /orderlines/:id/edit
(.:format) {:action=>“edit”, :controller=>“orderlines”}
orderline GET /orderlines/:id
(.:format)
{:action=>“show”, :controller=>“orderlines”}
PUT /orderlines/:id
(.:format)
{:action=>“update”, :controller=>“orderlines”}
DELETE /orderlines/:id
(.:format)
{:action=>“destroy”, :controller=>“orderlines”}
orders GET /orders
(.:format)
{:action=>“index”, :controller=>“orders”}
POST /orders
(.:format)
{:action=>“create”, :controller=>“orders”}
new_order GET /orders/new
(.:format)
{:action=>“new”, :controller=>“orders”}
edit_order GET /orders/:id/edit
(.:format) {:action=>“edit”, :controller=>“orders”}
order GET /orders/:id
(.:format)
{:action=>“show”, :controller=>“orders”}
PUT /orders/:id
(.:format)
{:action=>“update”, :controller=>“orders”}
DELETE /orders/:id
(.:format)
{:action=>“destroy”, :controller=>“orders”}
orders_states GET /orders_states
(.:format)
{:action=>“index”, :controller=>“orders_states”}
POST /orders_states
(.:format)
{:action=>“create”, :controller=>“orders_states”}
new_orders_state GET /orders_states/new
(.:format)
{:action=>“new”, :controller=>“orders_states”}
edit_orders_state GET /orders_states/:id/edit
(.:format) {:action=>“edit”, :controller=>“orders_states”}
orders_state GET /orders_states/:id
(.:format)
{:action=>“show”, :controller=>“orders_states”}
PUT /orders_states/:id
(.:format)
{:action=>“update”, :controller=>“orders_states”}
DELETE /orders_states/:id
(.:format)
{:action=>“destroy”, :controller=>“orders_states”}
orders_types GET /orders_types
(.:format)
{:action=>“index”, :controller=>“orders_types”}
POST /orders_types
(.:format)
{:action=>“create”, :controller=>“orders_types”}
new_orders_type GET /orders_types/new
(.:format)
{:action=>“new”, :controller=>“orders_types”}
edit_orders_type GET /orders_types/:id/edit
(.:format) {:action=>“edit”, :controller=>“orders_types”}
orders_type GET /orders_types/:id
(.:format)
{:action=>“show”, :controller=>“orders_types”}
PUT /orders_types/:id
(.:format)
{:action=>“update”, :controller=>“orders_types”}
DELETE /orders_types/:id
(.:format)
{:action=>“destroy”, :controller=>“orders_types”}
pages GET /pages
(.:format)
{:action=>“index”, :controller=>“pages”}
POST /pages
(.:format)
{:action=>“create”, :controller=>“pages”}
new_page GET /pages/new
(.:format)
{:action=>“new”, :controller=>“pages”}
edit_page GET /pages/:id/edit
(.:format) {:action=>“edit”, :controller=>“pages”}
page GET /pages/:id
(.:format)
{:action=>“show”, :controller=>“pages”}
PUT /pages/:id
(.:format)
{:action=>“update”, :controller=>“pages”}
DELETE /pages/:id
(.:format)
{:action=>“destroy”, :controller=>“pages”}
payments GET /payments
(.:format)
{:action=>“index”, :controller=>“payments”}
POST /payments
(.:format)
{:action=>“create”, :controller=>“payments”}
new_payment GET /payments/new
(.:format)
{:action=>“new”, :controller=>“payments”}
edit_payment GET /payments/:id/edit
(.:format) {:action=>“edit”, :controller=>“payments”}
payment GET /payments/:id
(.:format)
{:action=>“show”, :controller=>“payments”}
PUT /payments/:id
(.:format)
{:action=>“update”, :controller=>“payments”}
DELETE /payments/:id
(.:format)
{:action=>“destroy”, :controller=>“payments”}
payments_types GET /payments_types
(.:format)
{:action=>“index”, :controller=>“payments_types”}
POST /payments_types
(.:format)
{:action=>“create”, :controller=>“payments_types”}
new_payments_type GET /payments_types/new
(.:format)
{:action=>“new”, :controller=>“payments_types”}
edit_payments_type GET /payments_types/:id/edit
(.:format) {:action=>“edit”, :controller=>“payments_types”}
payments_type GET /payments_types/:id
(.:format)
{:action=>“show”, :controller=>“payments_types”}
PUT /payments_types/:id
(.:format)
{:action=>“update”, :controller=>“payments_types”}
DELETE /payments_types/:id
(.:format)
{:action=>“destroy”, :controller=>“payments_types”}
products_images GET /products_images
(.:format)
{:action=>“index”, :controller=>“products_images”}
POST /products_images
(.:format)
{:action=>“create”, :controller=>“products_images”}
new_products_image GET /products_images/new
(.:format)
{:action=>“new”, :controller=>“products_images”}
edit_products_image GET /products_images/:id/edit
(.:format) {:action=>“edit”, :controller=>“products_images”}
products_image GET /products_images/:id
(.:format)
{:action=>“show”, :controller=>“products_images”}
PUT /products_images/:id
(.:format)
{:action=>“update”, :controller=>“products_images”}
DELETE /products_images/:id
(.:format)
{:action=>“destroy”, :controller=>“products_images”}
products GET /products
(.:format)
{:action=>“index”, :controller=>“products”}
POST /products
(.:format)
{:action=>“create”, :controller=>“products”}
new_product GET /products/new
(.:format)
{:action=>“new”, :controller=>“products”}
edit_product GET /products/:id/edit
(.:format) {:action=>“edit”, :controller=>“products”}
product GET /products/:id
(.:format)
{:action=>“show”, :controller=>“products”}
PUT /products/:id
(.:format)
{:action=>“update”, :controller=>“products”}
DELETE /products/:id
(.:format)
{:action=>“destroy”, :controller=>“products”}
products_subcategories GET /products_subcategories
(.:format)
{:action=>“index”, :controller=>“products_subcategories”}
POST /products_subcategories
(.:format)
{:action=>“create”, :controller=>“products_subcategories”}
new_products_subcategory GET /products_subcategories/new
(.:format)
{:action=>“new”, :controller=>“products_subcategories”}
edit_products_subcategory GET /products_subcategories/:id/edit
(.:format) {:action=>“edit”, :controller=>“products_subcategories”}
products_subcategory GET /products_subcategories/:id
(.:format)
{:action=>“show”, :controller=>“products_subcategories”}
PUT /products_subcategories/:id
(.:format)
{:action=>“update”, :controller=>“products_subcategories”}
DELETE /products_subcategories/:id
(.:format)
{:action=>“destroy”, :controller=>“products_subcategories”}
products_colors GET /products_colors
(.:format)
{:action=>“index”, :controller=>“products_colors”}
POST /products_colors
(.:format)
{:action=>“create”, :controller=>“products_colors”}
new_products_color GET /products_colors/new
(.:format)
{:action=>“new”, :controller=>“products_colors”}
edit_products_color GET /products_colors/:id/edit
(.:format) {:action=>“edit”, :controller=>“products_colors”}
products_color GET /products_colors/:id
(.:format)
{:action=>“show”, :controller=>“products_colors”}
PUT /products_colors/:id
(.:format)
{:action=>“update”, :controller=>“products_colors”}
DELETE /products_colors/:id
(.:format)
{:action=>“destroy”, :controller=>“products_colors”}
products_categories GET /products_categories
(.:format)
{:action=>“index”, :controller=>“products_categories”}
POST /products_categories
(.:format)
{:action=>“create”, :controller=>“products_categories”}
new_products_category GET /products_categories/new
(.:format)
{:action=>“new”, :controller=>“products_categories”}
edit_products_category GET /products_categories/:id/edit
(.:format) {:action=>“edit”, :controller=>“products_categories”}
products_category GET /products_categories/:id
(.:format)
{:action=>“show”, :controller=>“products_categories”}
PUT /products_categories/:id
(.:format)
{:action=>“update”, :controller=>“products_categories”}
DELETE /products_categories/:id
(.:format)
{:action=>“destroy”, :controller=>“products_categories”}
sellers GET /sellers
(.:format)
{:action=>“index”, :controller=>“sellers”}
POST /sellers
(.:format)
{:action=>“create”, :controller=>“sellers”}
new_seller GET /sellers/new
(.:format)
{:action=>“new”, :controller=>“sellers”}
edit_seller GET /sellers/:id/edit
(.:format) {:action=>“edit”, :controller=>“sellers”}
seller GET /sellers/:id
(.:format)
{:action=>“show”, :controller=>“sellers”}
PUT /sellers/:id
(.:format)
{:action=>“update”, :controller=>“sellers”}
DELETE /sellers/:id
(.:format)
{:action=>“destroy”, :controller=>“sellers”}
users_accounts GET /users_accounts
(.:format)
{:action=>“index”, :controller=>“users_accounts”}
POST /users_accounts
(.:format)
{:action=>“create”, :controller=>“users_accounts”}
new_users_account GET /users_accounts/new
(.:format)
{:action=>“new”, :controller=>“users_accounts”}
edit_users_account GET /users_accounts/:id/edit
(.:format) {:action=>“edit”, :controller=>“users_accounts”}
users_account GET /users_accounts/:id
(.:format)
{:action=>“show”, :controller=>“users_accounts”}
PUT /users_accounts/:id
(.:format)
{:action=>“update”, :controller=>“users_accounts”}
DELETE /users_accounts/:id
(.:format)
{:action=>“destroy”, :controller=>“users_accounts”}
sharing_files GET /sharing_files
(.:format)
{:action=>“index”, :controller=>“sharing_files”}
POST /sharing_files
(.:format)
{:action=>“create”, :controller=>“sharing_files”}
new_sharing_file GET /sharing_files/new
(.:format)
{:action=>“new”, :controller=>“sharing_files”}
edit_sharing_file GET /sharing_files/:id/edit
(.:format) {:action=>“edit”, :controller=>“sharing_files”}
sharing_file GET /sharing_files/:id
(.:format)
{:action=>“show”, :controller=>“sharing_files”}
PUT /sharing_files/:id
(.:format)
{:action=>“update”, :controller=>“sharing_files”}
DELETE /sharing_files/:id
(.:format)
{:action=>“destroy”, :controller=>“sharing_files”}
sharing_files_categories GET /sharing_files_categories
(.:format)
{:action=>“index”, :controller=>“sharing_files_categories”}
POST /sharing_files_categories
(.:format)
{:action=>“create”, :controller=>“sharing_files_categories”}
new_sharing_files_category GET /sharing_files_categories/new
(.:format)
{:action=>“new”, :controller=>“sharing_files_categories”}
edit_sharing_files_category GET /sharing_files_categories/:id/edit
(.:format) {:action=>“edit”, :controller=>“sharing_files_categories”}
sharing_files_category GET /sharing_files_categories/:id
(.:format)
{:action=>“show”, :controller=>“sharing_files_categories”}
PUT /sharing_files_categories/:id
(.:format)
{:action=>“update”, :controller=>“sharing_files_categories”}
DELETE /sharing_files_categories/:id
(.:format)
{:action=>“destroy”, :controller=>“sharing_files_categories”}
sharing_files_destinators GET /sharing_files_destinators
(.:format)
{:action=>“index”, :controller=>“sharing_files_destinators”}
POST /sharing_files_destinators
(.:format)
{:action=>“create”, :controller=>“sharing_files_destinators”}
new_sharing_files_destinator GET /sharing_files_destinators/new
(.:format)
{:action=>“new”, :controller=>“sharing_files_destinators”}
edit_sharing_files_destinator GET /sharing_files_destinators/:id/
edit(.:format)
{:action=>“edit”, :controller=>“sharing_files_destinators”}
sharing_files_destinator GET /sharing_files_destinators/:id
(.:format)
{:action=>“show”, :controller=>“sharing_files_destinators”}
PUT /sharing_files_destinators/:id
(.:format)
{:action=>“update”, :controller=>“sharing_files_destinators”}
DELETE /sharing_files_destinators/:id
(.:format)
{:action=>“destroy”, :controller=>“sharing_files_destinators”}
users_accounts_types GET /users_accounts_types
(.:format)
{:action=>“index”, :controller=>“users_accounts_types”}
POST /users_accounts_types
(.:format)
{:action=>“create”, :controller=>“users_accounts_types”}
new_users_accounts_type GET /users_accounts_types/new
(.:format)
{:action=>“new”, :controller=>“users_accounts_types”}
edit_users_accounts_type GET /users_accounts_types/:id/edit
(.:format) {:action=>“edit”, :controller=>“users_accounts_types”}
users_accounts_type GET /users_accounts_types/:id
(.:format)
{:action=>“show”, :controller=>“users_accounts_types”}
PUT /users_accounts_types/:id
(.:format)
{:action=>“update”, :controller=>“users_accounts_types”}
DELETE /users_accounts_types/:id
(.:format)
{:action=>“destroy”, :controller=>“users_accounts_types”}
pizarro_index GET /pizarro
(.:format)
{:action=>“index”, :controller=>“pizarro”}
POST /pizarro
(.:format)
{:action=>“create”, :controller=>“pizarro”}
new_pizarro GET /pizarro/new
(.:format)
{:action=>“new”, :controller=>“pizarro”}
edit_pizarro GET /pizarro/:id/edit
(.:format) {:action=>“edit”, :controller=>“pizarro”}
pizarro GET /pizarro/:id
(.:format)
{:action=>“show”, :controller=>“pizarro”}
PUT /pizarro/:id
(.:format)
{:action=>“update”, :controller=>“pizarro”}
DELETE /pizarro/:id
(.:format)
{:action=>“destroy”, :controller=>“pizarro”}

root /
{:action=>“toOldSite”, :controller=>“pizarro”, :id=>0}
/
pizarro
{:action=>“home”, :controller=>“pizarro”, :id=>0}
/:controller/:action
/:controller/:action/:id
/:controller/:action/:id(.:format)

Actually yes, I should clean this you’re right, I’m going to check it.

CiriusMex wrote:

Right, sorry, I’m just going mad trying to figure this out :wink:

Understood. I haven’t had time to look closely at your routes, except
to notice that you probably have far too many of them. Did you just
make a controller and a map.resources line for every model whether you
needed it or not?

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

On Jan 26, 2:36 pm, CiriusMex [email protected] wrote:

welcome :slight_smile:
edit_announce GET /announces/:id/edit
banners_images GET /banners_images
banners_image GET /banners_images/:id
{:action=>“index”, :controller=>“banners”}
{:action=>“show”, :controller=>“banners”}
(.:format)
(.:format)
new_orders_reduction GET /orders_reductions/new
DELETE /orders_reductions/:id
{:action=>“new”, :controller=>“countries”}
{:action=>“destroy”, :controller=>“countries”}
(.:format) {:action=>“edit”, :controller=>“reductions_customers”}
(.:format)
(.:format)
POST /reductions_tickets
PUT /reductions_tickets/:id
{:action=>“create”, :controller=>“accesses_permitions”}
{:action=>“update”, :controller=>“accesses_permitions”}
(.:format)
(.:format)
{:action=>“destroy”, :controller=>“contacts_messages”}
contacts_threads GET /contacts_threads
(.:format)
{:action=>“index”, :controller=>“contacts_threads”}
POST /contacts_threads

read more »

Could you please reupload this to pastebin or something similar? Not
only does it not fill the thread with seeming noise, but it also keeps
the format readable.

That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with :controller =>
‘pizarro’, :action => ‘logout’, :id => 0, “/:controller/:action” gets
matched before “/:controller/:action/:id”. (remove the map.connect
‘:controller/:action’ from your routes.rb and restart the server to
see for yourself)

Things like this are why I try to avoid leaving in the default routes
whenever possible.

pharrington wrote:

On Jan 26, 2:36�pm, CiriusMex [email protected] wrote:

welcome :slight_smile:

ROUTES BE HERE

Google groups cut out my last message, so I’ll repost in case any
other readers were finnicky about it…

Could you please reupload this to pastebin or something similar?

I strongly object to using pastebin for things like this. What’s
discussed on the list should be on the list.

Not
only does it not fill the thread with seeming noise,

Noise? This is relevant info that I specifically asked the OP for.

but it also keeps
the format readable.

That’s true and may well be a reason to use pastebin in this case.
Normally, though, I’d rather keep stuff inline.

That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with url_for/
redirect_to/whatev :controller => ‘pizarro’, :action => ‘logout’, :id
=> 0, “/:controller/:action” gets matched before
“/:controller/:action/:id”. (remove the map.connect
‘:controller/:action’ from your routes.rb and restart the server to
see for yourself)

I do not think this is the problem in this case.

Things like this are why I try to avoid leaving in the default routes
whenever possible.

The default routes can actually be quite useful if you understand their
priorities. They’d be more useful if there were a way to do a generic
map.resources.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

On Jan 26, 2:36 pm, CiriusMex [email protected] wrote:

welcome :slight_smile:

ROUTES BE HERE

Google groups cut out my last message, so I’ll repost in case any
other readers were finnicky about it…

Could you please reupload this to pastebin or something similar? Not
only does it not fill the thread with seeming noise, but it also keeps
the format readable.

That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with url_for/
redirect_to/whatev :controller => ‘pizarro’, :action => ‘logout’, :id
=> 0, “/:controller/:action” gets matched before
“/:controller/:action/:id”. (remove the map.connect
‘:controller/:action’ from your routes.rb and restart the server to
see for yourself)

Things like this are why I try to avoid leaving in the default routes
whenever possible.

CiriusMex wrote:

That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with url_for/
redirect_to/whatev :controller => ‘pizarro’, :action => ‘logout’, :id
=> 0, “/:controller/:action” gets matched before
“/:controller/:action/:id”. (remove the map.connect
‘:controller/:action’ from your routes.rb and restart the server to
see for yourself)

Things like this are why I try to avoid leaving in the default routes
whenever possible.

I didn’t knew it was mapping that way. However I tried to do as you
said without any result. I must precise something, the problem of
redirection occurs only on the server (the online webapplication), in
my local version on my computer I have no problem, it’s working great.

Did you restart the server? Are both routes files identical?

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

On Jan 27, 3:45 pm, CiriusMex [email protected] wrote:

I didn’t knew it was mapping that way. However I tried to do as you
said without any result. I must precise something, the problem of
redirection occurs only on the server (the online webapplication), in
my local version on my computer I have no problem, it’s working great.

What versions of Ruby and Rails is the server running; what versions
of Ruby and Rails is your computer running?

On Jan 27, 3:45 pm, CiriusMex [email protected] wrote:

I didn’t knew it was mapping that way. However I tried to do as you
said without any result. I must precise something, the problem of
redirection occurs only on the server (the online webapplication), in
my local version on my computer I have no problem, it’s working great.

I know that at least Rails 2.3.5 (running on Ruby 1.9, not sure if the
Ruby version matters for this though) exhibits the behavior you
described. Perhaps this changed from an earlier version.

That being said, routes are generated/matched in the order they are
defined in routes.rb. SO, when generating a route with url_for/
redirect_to/whatev :controller => ‘pizarro’, :action => ‘logout’, :id
=> 0, “/:controller/:action” gets matched before
“/:controller/:action/:id”. (remove the map.connect
‘:controller/:action’ from your routes.rb and restart the server to
see for yourself)

Things like this are why I try to avoid leaving in the default routes
whenever possible.

I didn’t knew it was mapping that way. However I tried to do as you
said without any result. I must precise something, the problem of
redirection occurs only on the server (the online webapplication), in
my local version on my computer I have no problem, it’s working great.

I restarted the server after doing the changes, and I have others
application on the same server working correctly too…It’s quite a
mistery as I can’t figure out what is the difference between those
others applications and this one. In my local machine the rails and
ruby versions are different, older ones, but I don’t think this
behavior changed in the new ones

On Jan 27, 4:00 pm, CiriusMex [email protected] wrote:

In my local machine the rails and
ruby versions are different, older ones

This is pretty relevant!

On 27 ene, 15:04, pharrington [email protected] wrote:

On Jan 27, 4:00 pm, CiriusMex [email protected] wrote:

In my local machine the rails and
ruby versions are different, older ones

This is pretty relevant!

Yeah I agree but as others application on the same server are working
I don’t understand why I’m having problems with this one…