Displaying 20 results from an estimated 1000 matches similar to: "manually invoking routing?"
2007 Aug 01
1
multipart remote_form_for
I''m trying to figure out how to create an AJAXified form with
remote_form_for that can submit a file upload, to no avail. Any pointers
for me?
- donald
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
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 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
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
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
2012 Sep 25
1
Problem with zcat uncompressing man pages
Hi
When I read 'certain' -- not all -- man pages zcat writes a small error to stderr when opening the man page; however, the man page does actually open. The message i get on the terminal is:
zcat: error writing to output: Broken pipe
zcat: /usr/local/man/man5/muttrc.5.gz: uncompress failed
When closing the man page, another message is shown on stderr:
grotty:<standard input>
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 May 07
3
Needle + Rails - IoC
Hi,
I''m looking for past efforts to integrate Rails and Needle. I am
thinking of doing it myself but would be interested in seeing what
others have done before.
If there are examples of other IoC frameworks being used with Ruby I''d
be interested in hearing about them too. I find IoC to be a helpful
concept in general and, having glanced at a few existing Rails app.s, I
2006 Jun 16
4
Unit test and get request with a URL
I''m tyring to write a unit test that uses a get() method to simulate a
get request in my functional test. However, get wants an action, and I
have a URL. I''m trying to redirect to a URL the user tried to hit
before logging in. After they login I want to go back to the URL they
originally tried.
I can''t find the get() method code in the help or otherwise. I
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''
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
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
2007 Oct 05
4
have_xml_tag
Hi
Was just using have_tag on an xml response and found the problem
outlined and resolved here
http://weblog.jamisbuck.org/2007/1/4/assert_xml_select
Just wondered if there is any support in rspec?
Cheers
Shane
Shane Mingins
ELC Technologies (TM)
PO Box 247
Santa Barbara, CA 93102
Phone: +64 4 568 6684
Mobile: +64 21 435 586
Email: smingins at elctech.com
AIM: ShaneMingins
Skype:
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",
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 =>
2000 Dec 09
0
minor problem with openssh and man
hiho,
there's a minor problem with openssh and man.
here's a log:
[root at server /root]# man <any manpage>
gunzip: stdout: Broken pipe
gunzip: stdout: Broken pipe
...
grotty:<standard input>:13442:fatal error: output error
[root at server /root]#
the manpage itself is correct.
i'm using:
redhat 6.2
man-1.5h1
openssh-2.3.0p1
before openssh i used ssh2-2.3.0 without
2005 Dec 15
10
.rpdf ?
I haven''t delved into the wonderful world of PDF::Writer yet, nor have I
run across a need.. but I just had an idea I wanted to throw out there
how hard would it be to create a .rpdf template plugin for rails?
could be neat ;]
2010 Apr 23
2
Routing a Sinatra application
Hello,
I wish to route a sinatra application in my Rails 3 app. As said by
Yehuda, it should be possible.
http://yehudakatz.com/2009/12/26/the-rails-3-router-rack-it-up/
However I see the route isn''t recognized and I get
ActionController::RoutingError problems.
It works well with simple rack apps however (the test in actionpack
with a lambda passes well).
I''ve written a test
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
2007 May 22
3
Comments wanted about spec''ing out a couple controller methods
(oops, accidentally sent this to the rspec-devel list, sorry about that)
Could someone help me spec out these Rails controller methods? I
don''t know where to get started, especially with the transaction
stuff. Or, if anyone else could suggest ways I could improve the
code, that would be great as well.
Puzzle has_one Media. Both are AR model objects.
class PuzzlesController <