similar to: Problem with recognize_path

Displaying 20 results from an estimated 100 matches similar to: "Problem with recognize_path"

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
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
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
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
2007 Nov 07
3
Weird freeze problem
Hello, I am running mongrel 1.1 in production mode behind a lighttpd with mod_proxy. At first everything works fine, however, after a few days, the mongrel servers stop answering at all, even if I try to connect to them directly. I have checked logs but there is no sign of anything at all, and even when there was not a single request for a few days, it did freeze, and that on repeated occasions.
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
2005 Nov 16
4
What happened to mysql connection?
I''ve been using Rails for more than six months and until today I had no problem with mysql connection. It''s a Mac OS X 10.4 box having rails installed and updated by gem. I use a remote mysql server no local instance installed. Here''s my config: development: adapter: mysql database: hdchat host: 10.0.0.1 username: webuser password: test: adapter:
2006 May 23
6
How to list all models of an application?!?
How can I get a list of all model classes in the domain of a Rails application (all models, both in "app/models" and in components/somedir/model.rb)? Thanx in advance for your precious help! Edoardo "Dado" Marcora
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
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
2006 Feb 01
3
Testing components
I''m using template components to modularize an application I''m working on and am really happy with the way it''s going. Unfortunately, all my attempts at writing functional tests for them fail. Trying to duplicate my normal controller tests I have: require File.dirname(__FILE__) + ''/../test_helper'' require File.dirname(__FILE__) +
2008 Mar 28
10
Inheriting from AdminController intstead from ApplicationController
Hi I would like to do the following: I have created an admin namespace and the required folders app/admin views/admin etc. And then I wanted all controllers under app/admin to inherit from a controller named AdminController which resists under app/admin/admin.rb instead of inhereting from ApplicationController, so I could better separate between admin and public section. The AdminController
2010 Sep 04
3
its easy but i forgot all
my models borrower ----- has_many :loans loan ----- belongs_to :borrower my loans _controller def new @borrower = Borrower.find(params[:borrower_id]) logger.debug '' @borrower.id'' logger.debug @borrower.id @loan = Loan.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @loan } end
2006 Jan 19
4
UserEngine - rake bootstrap aborted => undefined method `synchronize_with_controllers'' for Permission:Class
Good day all. I have successfully installed Engines and LoginEngine and LE is setup and running correctly. However, after installing and setting up UE, when attempting to run the rake bootstrap method I get the following error: undefined method `synchronize_with_controllers'' for Permission:Class My environment is Rails 1.0.0 Ruby 1.8.2 WinXP WebBRICK MySQL 4.1.14 I found the following
2006 Apr 07
6
Multiple view types for a single action?
Is it possible to have more than one kind of view for a specific action, for example an .rhtml and a .rjs file to handle the view for the same action? I suspect not, but this makes me wonder if there a way to call the .rjs file from within the .rhtml so the statements within it get executed? Thanks, Andy
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
2010 Nov 16
2
Pronote 2010
Bonjour, Je suis d?sol? de poser ma question en fran?ais mais mon anglais n'est pas suffisamment correct pour le sujet que je veux aborder. Mon ?tablissement scolaire utilise un serveur de notes PRONOTE et chez moi j'ai install? un client sous Wine. La connexion au serveur se fait sans difficult?, je peux rentrer mes notes et j'ai acc?s ? tous les services propos?s par ce logiciel.