Displaying 20 results from an estimated 80000 matches similar to: "Access named routes outside controller or view"
2007 Oct 16
2
Named routes in controller not working?
I have some "redirect_to"s using named routes in a controller that work
fine in the browser, but choke my tests. The route in question is
"new_session" and comes from a "map.resource :session, :controller =>
:session" route mapping. If I replace the named route in the controller
with controller/action the tests run just fine, but for some reason it
doesn''t
2008 Jan 17
4
multiple views, and some routers
Hi, I''m new to Rails (just a Java Programmer tired of having to
configure a lot of xml''s and mapping classes just to make a simple page
(...))
anyway,
I''m experiencing some problems with routers, i''ve created a new project
using Rails 2.0 and created a scaffold for users.
so i have the following:
users/new.html.erb
...
(and the other pages created by the
2015 May 12
0
Letting linux be the router, allowing dynamic routes, suggestion
On Tue, May 12, 2015 at 04:27:10PM -0300, Marcelo Pacheco wrote:
> Consider the challenge of having completely dynamic routing between vpn
> peers. In one minute I might have 10000 routes towards one specific peer,
> and hour latter I might have NONE. And I need to diferentiate each peer at
> the kernel routing layer.
> And no, it can't be a pure bridge, it has to be L3
2012 May 01
0
Engine: access to url_helpers otside view/controller
I use Engine.
How to get access to url_helpers, such as <name>_path or _<name>_url, in
a separate class? In application it simple:
Rails.application.routes.url_helpers.<name>_path
But how to get access to url_helpers in Engine? When I use
Rails.application.routes.url_helpers.root_path, then I get ''/'', root of
Application. Other helpers for Engine
2020 Jul 23
0
Re: Routed network can't reach outside network
On Thu, Jul 23, 2020 at 03:34:03PM +0100, Rui Correia wrote:
> > Is net.ipv4.ip_forward set to 0 ?
> >
> >
> I assume you're asking if this is setup on the host and not on the VM's.
> I've checked the host and it is configured like this:
> $ sysctl net.ipv4.ip_forward
> net.ipv4.ip_forward = 1
This is good.
> Should I change it to =0 ? It
2011 May 17
6
Nested Resource w/ Collection
Hi guys,
In my routes file I have the following nested resource:
resources :users do
collection do
get ''posts''
end
end
However, when I visit this URL: http://localhost:3000/users/posts, I get this error: "The action ''posts'' could not be found for UsersController"
In my UsersController I have the following:
class
2015 May 12
2
Letting linux be the router, allowing dynamic routes, suggestion
No, this would in fact operate as a routing mode instead of bridging.
TAP would be used as a means to push routing to where it belongs, the
linux/bsd/... kernel.
Consider the challenge of having completely dynamic routing between vpn
peers. In one minute I might have 10000 routes towards one specific peer,
and hour latter I might have NONE. And I need to diferentiate each peer at
the kernel
2015 May 12
2
Letting linux be the router, allowing dynamic routes, suggestion
I see what you want me to do. But it does incur an extra MAC layer header
to each VPN packet, more fragmentation.
And broadcasts leak to all peers.
It sure saves you from doing any improvements, but there are side effects
that are undesirable to many customers.
This is specially a problem if I want two VPN connections between two sites
using redundant connections, we get an instant L2 loop.
With
2007 Mar 14
11
path vs. url
When using named RESTful routes, when should one use the
generated ..._path helpers, and when the ..._url helpers? Say I did
this in routes.rb:
map.resources :users
Where should I use users_path, new_user_path, etc., and where should I
use users_url, new_user_url...?
Thanks!
Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to
2009 Nov 17
2
Windows Routing issue
Hello All,
I took a break from trying to get Tinc working and have come back to it
now with the release of 1.0.11. I have 2 Windows computers connected
behind firewalls and everything seems to be correct, except I cannot
seem to get any data past the server TAP interface. I can ping the
Server TAP interface from the client, but no data will move through the
TAP interface to the Internet. I have
2008 May 15
1
Remove controller name from URL > nested routes
Hi..
There are my nested routes
map.resources :continent do |continent|
continent.resources :land do |land|
land.resources :destination
end
end
By example it generates this url
http://example/continent/azie/land/japan/destination/aomori
I want
http://example/continent/azie/japan/aomori
How can i realize this...?
Grtz...remco
--
Posted via
2006 Jan 28
0
[Frank] How can I access the domain name in routes.rb?
I am trying to setup an application where the URLs must be of the format
1) sub.domain.com/sub/category
and
2) sub.domain.com/search/something
In the first path the first part of the subdomain must match the folder name.
I tried to use request.domain(2) to get the domain information but keep getting errors.
I was thinking that may be I can setup regexp to math the
2006 Nov 04
0
Question about named routes - getting "No url can be generated for the hash"
So I''ve decided to clean up the structure of my rails app and have
been using named routes and storing certain controllers underneath
other controllers where appropriate.. For example, I have an
AdminController, as well as a ContentController. I decided to make
ContentController a subclass of the AdminController, because the
content management portion of the site is only accessible to
2008 Jun 12
3
Upgrading to 2.1 breaks my named routes
I just upgraded to 2.1 and attempted to log in to my application and
when this line is reached in my login action:
redirect_to(index_url)
I get the error
"wrong number of arguments (0 for 1)" [stack trace below].
Here''s my route:
map.index ''index'', :controller => ''e_simply'', :action => ''index''
I found
2009 Jul 30
6
How can I change member action names on routes?
I have some controllers with member/collection actions. I want to change
the name of those actions on the routes, so I can translate the action
"/search" to German, for example. How can I do it? I will appreciate any
help.
--
Posted via http://www.ruby-forum.com/.
2020 Jul 23
2
Re: Routed network can't reach outside network
On Thu, Jul 23, 2020 at 3:54 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:
> No, don't change it to 0. We need ip_forward enabled as you say.
>
That's what I thought. I'm leaving it as it is.
> Correct. The KVM host knows where the 10.2.2.1/24 subnet is - it owns
> it. The other hosts on your LAN don't know anything about 10.2.2.1/24,
> so if they
2007 Nov 07
0
Named routes raising nil.rewrite error
Hi all. I''m having a little problem with named routes. I have the
following named route:
map.with_options :controller => ''snippets'' do |map|
map.snippets
''faq/'', :action => ''index''
map.new_snippet ''faq/
new'', :action
2015 May 12
4
Letting linux be the router, allowing dynamic routes, suggestion
What challenge this would solve ?
VPN software in general tries to be another router when running in server
mode with multiple clients.
This restricts VPN customers from having complex topology.
For instance, I'd like to have two tunnels between each client network and
each server (with two broadband connections on each end), with some OSPF
running and automatically switching from one to
2006 Jul 08
0
Different URL generation in regular and named routes.
Obviously I am missed something, but why the way a path is generating
using named routes is a little bit different from using regular url_for?
1. Parameters from current request did not affect named routes, the way
it is in the url_for.
2. only_path=>false by default in named routes. It is true by default
whe using *_path instead of *_url, by why not to set it true by default
in *_url and
2006 Jul 11
0
Named routes raising exception
Hi,
I''m trying to follow some of the Rails Recipies, in particular the
authentication one. In the logout action there is redirect_to home_url. I''ve
tried to set up a route using map.home_url '''' in the routes.rb file. That
seems to cause an error
> undefined local variable or method `home'' for #<AdminController:0x3ab97f0>
>
> I