Displaying 17 results from an estimated 17 matches for "named_routes".
Did you mean:
named_route
2006 Aug 03
1
routeset mapper problem
hello,
I installed a rails app on dreamhost, which I''m building based on the
Comatose plugin, and it went smoothly for the first version.
Now I uploaded a second version where I broke down the Comatose code
into a regular rails app, which works alright locally, but can''t get
routing to work the same as before on the server. I believe I
double-checked all gotchas mentioned
2007 Jan 24
0
problems with themes in rails 1.2.1 -> named_route
i saw someone mentioned this somewhere else (1), but i wanted to make
sure that this wasn''t something that was going to cause me alot of grief
later..
i have been using the theme plugin (2) on several projects..
i updated to 1.2.1 today, and upgraded my mongrel to the latest one..
when i try running mongrel after updating my project, i get the
following error:
2007 Jan 17
8
Mocha Mock''s hanging on after test run?
Hi guys,
I''m running mocha (0.3.2) against Rails core and just found an issue
where the mock doesn''t go away after the test is run.
For example:
def test_reset_bang_doesn_reinstall_named_routes
ActionController::Routing::Routes.named_routes.expects(:install).never
@session.reset!
end
def test_zzz
puts ActionController::Routing::Routes.named_routes.inspect
assert !ActionController::Routing::Routes.named_routes
end
The print when test_zzz is run gives this:
#<Act...
2007 Mar 06
4
Rails 1.2 / Theme support plugin issue: Fix
...aw''
from ./script/../config/../config/routes.rb:1
Fix that I found for this is
# Go to vendor/plugins/theme_support/lib/patches/routeset_ex.rb
# Replace "draw" method with following
def draw
clear!
create_theme_routes
yield Mapper.new(self)
named_routes.install
end
# In create_theme_routes method
- replace named_route with add_named_route
- replace connect with add_route
So your create_theme_routes should look like this
def create_theme_routes
add_named_route ''theme_images'', "/themes/:theme/images/:filename&q...
2006 May 09
1
name_url in tests
...aste''):
test_routes(FilmsControllerTest):
NoMethodError: You have a nil object when you didn''t expect it!
The error occured while evaluating nil.rewrite
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:461:in `url_for''
generated/routing/named_routes/taste.rb:2:in `taste_url''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/test_process.rb:431:in `send''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/test_process.rb:431:in `method_missing''
test/functional/films_contro...
2007 Sep 04
7
1.05 to 1.08
Hi
We are looking at moving a project over from 1.05 to 1.08 but have a
problem with some of our helper specs
They work fine in 1.05 but error in 1.08 and it is the calls to route
helper methods that seems to be the problem.
I did some playing around .. because the code being tested is
reasonably large etc ... but this sample (using the peepcode app)
seems to boil down the problem
2012 May 11
14
What is the point of using :format in routes?
Today I had a strange behavior that made me suspect of jQuery at first,
but then it happened that I''ve faced two gotchas, one from CoffeeScript
and one from Rails itself.
I have something like this:
routes.rb
post ''/fields/:id.:format'' => ''fields#show'', as: :field,
constraints: {id: /\d+/}
post ''/fields/remove/:id''
2006 Aug 09
0
recent changes in routes
I''m writing a plugin that automatically creates a named route buy
hijacking RouteSet''s draw method. This no longer seems to work in
edge rails. Anyone know what changes in routes effected this and what
the preferred way would be now to automatically include route?
Here''s the code that used to work:
class ActionController::Routing::RouteSet
alias_method
2006 Jul 31
0
problems testing helpers - link_to and url_for don''t work...
So I''ve used the helper test plugin, and also tried some things from
Rails Recipes, and basically neither seems to work for cases where a
helper does anything related to link_to/url_for, and this includes
calling named_routes. This is obviously an issue, as a common use for
helpers is to refactoring something like this:
<%= link_to "text that changes slightly", :id => id %>
to this
<%= article_link "text", id, other_options %>
using a helper. That example is a over simplified, bu...
2006 May 08
0
testing named routes
...s me:
2) Error:
test_routes(FilmsControllerTest):
NoMethodError: You have a nil object when you didn''t expect it!
The error occured while evaluating nil.rewrite
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:459:in `url_for''
generated/routing/named_routes/overviews.rb:2:in `overviews_url''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/test_process.rb:431:in `send''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/test_process.rb:431:in `method_missing''
functional/films_con...
2006 Sep 26
0
some help with functional testing of nested routes
I have the following functional test in test/functional for testing my
products_controller:
require File.dirname(__FILE__) + ''/../test_helper''
require ''products_controller''
# Re-raise errors caught by the controller.
class ProductsController
def rescue_action(e)
raise e
end
end
class ProductsControllerTest < Test::Unit::TestCase
fixtures
2012 Sep 04
0
dynamic route generation
In polymorphic_routes.rb, line 131, a name route that has been built
(e.g. post_users_path) gets invoked on self (assuming there was not
RoutesProxy instance appended as the first element of the array passed
as the first argument to form_for, then send() would be invoked on
self, which is PolymorphicRoutes module, which belongs to
ActionDispatch::Routing):
(proxy || self).send(named_route, *args)
2008 Jul 23
0
undefined method `first' for :users:Symbol
Hello,
I am trying to move an existing fully functional Rails application
from my laptop (Running Leopard) to my Desktop (Running Debian). I
created a new Rails application on the Debian desktop and installed
the restful_authentication plugin. I also changed the routes.db file
to include maps for users and sessions. Now, when I try to start the
WeBrick server, I get the following error:
=>
2006 Feb 08
2
Adding routes via a plugin...
I have a plugin that I am working on that will as part of its distribution
contain a controller. I would like to be able to add a route for it in the
plugin''s init.rb so that when the plugin is loaded, the route will
automatically be registered without having to force the user to edit
routes.rb or even make a rake task to do it for them.
I saw the following code in one of the SVN
2006 Feb 13
1
dynamically generating a controller and appropriate routing
I''m working on a library similar to acts_as_taggable. I''d like it to be a
simple, one file drop-in: i.e., put my_library.rb into RAILSROOT/lib/ and
have everything work. However, the library requires a controller to render
some stuff, so I need to be able to create the controller class, set the
routing, and extend the controller at run-time from within my_library.rb.
I have code
2011 Jan 19
6
rake aborted! can't convert Hash into String
Hello,
I encouter a problem when i try to do "rake db:migrate":
rake aborted!
can''t convert Hash into String
Here is the trace result:
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
can''t convert Hash into String
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1408:in
2006 Aug 10
28
On the total nondisclosure of the 8/9/06 security vulnerability
Dear Rails team,
The handling of the recent vulnerability in Rails has proven somewhat
problematic for us. We have recently adopted Rails as our web platform
of choice; previously, we used J2EE. We love Rails. We hate J2EE. We
don''t want to go back. It took a lot of effort and convincing to get the
management teams of our various projects to sign off on the use of
Rails. The