Displaying 20 results from an estimated 55 matches for "recognize_paths".
Did you mean:
recognize_path
2007 Feb 10
3
recognize_path discrepency
hey all - wondering if someone would relive my confusion...
given a model called say Meeting and a route as
"map.resources :meetings"
in the console:
>>r=ActionController::Routing::Routes
>>r.recognize_paths "/meetings"
=>{:action="index",:controller=>"meetings"}
all works as I expect, but if I do
>>r.recognize_paths "/meetings/1"
=>{:action="1",:controller=>"meetings"}
which is what Id expect for a map.connect, but not for...
2011 Jun 21
0
Status of Rails.application.routes.recognize_path()
This might be more a question for the guys in the "Ruby on Rails: Core"
group, but I''ll try it out here first...
So, while writing a gem (engine) for rails, I found that I needed to have my
app (in a pre-filter) directly query the router. In the "old" days, this was
done using ActionController::Routing::Routes.recognize_path(). My 2nd
edition of "Agile Web
2009 Mar 06
2
Routes.recognize_path on more complicated Routes
For a permissions system i''m writing i''m extending the standard link_to
helpers to check if a user has a permission to perform that action
before displaying a link to clean-up my code so i don''t have to put if
checks all over them.
I''m trying to use..
ActionController::Routing::Routes.recognize_path(url, :method => method)
to get the action and controller
2011 Jun 22
3
Status of Rails.application.routes.recognize_path()
Sorry if this question isn''t really "Ruby on Rails: Core" material. I feel
it is, at least kind-of (also, I first tried asking in "Ruby on Rails: Talk"
to no avail.).
So, while writing a gem (engine) for rails, I found that I needed to have my
app (in a pre-filter) directly query the router. In the "old" days, this was
done using
2006 Oct 03
0
rs.recognize_path "/home" is not working in script/console
My application runs fine.
I just want to change a few routing rules and I decided to test using
script/console. But I''m getting following error.
Loading development environment.
>> rs = ActionController::Routing::Routes
>> rs.recognize_path "/home/index"
TypeError: can''t convert Fixnum into String
from
2007 Nov 16
3
Route Information
Is there a method to return a hash of the route configuration based on
a path?
For example:
magic_method(''/my_controller/my_action/my_id'')
=>
{:controller => ''my_controller'', :action => ''my_action'', :id =>
''my_id''}
Thanks!
Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message
2007 Sep 16
2
Problem with recognize_path
Hello,
I am experiencing a weird problem on one of the 3 test servers I''m
using:
There is a controller named admin/statistics and I am trying to
access /admin/statistics
The matching rule is: map.connect '':controller/:action/:id''
On 2 of the 3 servers, recognize_path correctly matches to
Parameters: {"action"=>"index",
2009 May 01
4
Can't get to an action in a RESTful controller
Folks,
I am using the restful_authentication plugin. This creates the users
controller which is declared as a resource in routes.rb as below
map.resources :users
Now in the UsersController I have created an action to resetpwd that I
am trying to get to from the login page when the user clicks "forgot
password". However, when I do that the log file tells me that the call
to
2007 Oct 03
3
manually invoking routing?
Hey folks. I have a rails controller which is filtering search results
for access control. The search results are typically URLs into the rest
of the rails app. I''m finding it would simplify the grotty code which is
accumulating if I could manually invoke the router. That is to say, if I
could send something a URI path string and get back the hash of
controller, action, and params that
2007 Aug 25
4
REST routes :has_many , new style
I am trying to write a nested route ''new style''
map.resources :franchises, :has_many => :documents
in place of the :
map.resources :franchises do |franchises|
franchises.resources :documents, :name_prefix => "franchise_"
end
but get an error :
no route found to match "/franchises/1/documents" with {:method=>:get}
running rake routes,
2006 Jul 20
5
Why don''t I get 404s?
When I go to a missing page in my rails app, I get the 500.html page,
and this in my log output:
no route found to match "/asdasd" with {:method=>:get}
./script/../config/../vendor/rails/actionpack/lib/action_controller/
routing.rb:1057:in `recognize_path''
./script/../config/../vendor/rails/actionpack/lib/action_controller/
routing.rb:1047:in `recognize''
2006 Feb 22
7
Ruby on Rails with Apache2, MS SQL on Windows XP
My app was running fine with Linux, Apache2/Lighttpd and MySQL. I have a
need to migrate to Windows, Apache2 and MS SQL. But I keep getting the
following error when I load the initial home page. Anyone can please
give me a pointer where to go next for troubleshooting? Thanks in
advance.
NameError in <controller not set>#<action not set>
uninitialized constant
2006 Jul 05
1
Routing error "unitialized constant" after refactoring
Hi. I''ve heavily refactored an application. When I access
http://0.0.0.0:3000/ I now get the stack trace at the end of this mail.
My routes.rb:
ActionController::Routing::Routes.draw do |map|
map.connect '''', :controller => ''user/dashboard'', :action => ''boo''
map.connect '':controller/:action/:id'',
2006 Apr 03
3
[newbi] Problem Routes
Hello,
i try to follow this video
http://www.illanti.com/files/locomotive101.mov
After change my routes
routes.db
ActionController::Routing::Routes.draw do |map|
# Add your own custom routes here.
# The priority is based upon order of creation: first created ->
highest priority.
# Here''s a sample route:
# map.connect ''products/:id'', :controller =>
2006 Apr 21
0
Troubleshooting recognition failures?
How does one go about troubleshooting a "Routing Error" "Recognition
failure"?
I''ve used the Webrick log to get down to a "recognize_path(path)" call
in /actionpack-1.12.1/lib/action_controller/routing.rb and put a
logger.debug path there, but that just told me what I already knew, and
the definition of "recognize_path" looks like its
2006 Aug 14
0
Recognition failed for ...
Hello,
I''m new to Rails so please forgive me if I''m asking any stupid
questions...
I''m trying to set up lighttpd so that is supports multiple Rails apps
(in the form of http://server/app1, http://server/app2, etc). OS:
Gentoo, 2.6.17 kernel, ruby 1.8.4, rails 1.1.6, lighttpd 1.4.11
My rails app is generated into /mnt/b/www/rails/test1/ and I''ve appended
2009 Nov 10
10
Un-recognised routes that do exist, using namespaces & subdomain checking
I''m getting really cheesed off with RSpec not matching some of my
routes when controller testing when I have subdomain checking
(courtesy of subdomain-fu) on namespaces. These routes appear in the
rake routes output, and work fine via HTTP requests .
The really annoying thing is it''s working fine for routes that aren''t
at the root of the namespace.
E.g. say I have
2008 Feb 01
1
Rails routing and active scaffold fight to the death
Just kidding, it''s not as bad as it seems. Right now I don''t have
much in my route.rb, and I''m getting this in my console:
Processing ApplicationController#index (for 127.0.0.1 at 2008-02-01
14:54:00) [GET]
[2008-02-01 14:54:00] (552) INFO Session ID:
a8eeb58764d872bbd1fdb337636e68e7
[2008-02-01 14:54:00] (552) INFO Parameters: {}
[2008-02-01 14:54:00] (552)
2006 Aug 05
1
"uninitialized constant" error when I go to app base URL???
Hi,
I''m getting the below attached error when I navigate to the root of my
web application on my hosting site (dreamhost.com), however in
development it works fine. Any ideas?
That is I have one controller so the direct URL is
"http://mydomain.com/contacts". This works on dreamhost and locally.
BUT when I go to "http://mydomain.com/" this works locally (on
2009 Aug 13
6
Strange Routing
Hi Guys,
I have some strangeness with routing, using standard route
map.connect '':controller/:action/:id''
map.connect '':controller/:action/:id.:format''
Using console I did
>> rts = ActionController::Routing::Routes
>> rts.generate(:action => "edit", :controller => ''vendorlocations'', :id => 10)
=>