Displaying 20 results from an estimated 4000 matches similar to: "QUESTION: Routing system scalability/best practices"
2006 Jan 16
3
routing to controller inside module
Hey,
am i to stupid to find the information about how to route to a
controller in a module? Maybe module support has gone!
The controller is under:
app/controllers/admin/my_controller.rb
The my_controller.rb file looks like this:
module Admin
class MyController
def index
render :text => ''Hello!''
end
end
end
How does a route to all controllers under module
2006 Aug 07
1
Routing/Redirecting
Hi all,
Can someone tell me how I could redirect from an url like
"www.url.com/mycontroller" to "www.url.com/en/mycontroller"? I was
reading all sorts of routing documentation but couldn''t come up with a
solution. Of course this should be a general rule, so
"www.url.com/mycontroller/myaction/myparam=99" should naturally redirct
to
2007 Jul 29
4
Server dying with perpetual "Connection reset by peer"
I''m at a loss to explain a very strange error I''m getting.
This seems to happen on our production system where we have a
backgroundrb server sharing a host with a Rails app running on
Mongrel. The first one or two, occasionally three, calls to a worker
(direct MiddleMan calls from Rails, not scheduled) succeed, but
afterwards, the server fails to initialize new workers.
2006 Aug 06
0
Can I strip a file suffix off a URL with routing?
I would like a route that strips of the suffix of a url before
determining the action. Eg:
http://mydomain.com/my_controller/my_action.pdf
Would map to: { :controller => ''my_controller'', :action => ''my_action'' }
Is this possible?
Thanks,
-Jonathan.
2006 May 11
1
skipping filters
I have a simple login scheme in application.rb. Something like
:requires_login is called in any controller as a before_filter. All is
good, except I''m having trouble figuring out how to make the public
login actions skip this before filter. Here''s what I have:
application.rb
skip_before_filter :requires_login, :only => [:login, :logout,
:confirm_valid_login]
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
2006 Jan 29
2
GetText and rjs templates?
hi,
is it possible that gettext don''t work with rjs templates?
i''ve just tried this simple example
blog_controller.rb :
class BlogController < ApplicationController
def index
end
def dosomething
end
end
index.rhtml :
<html>
<head>
<%= javascript_include_tag :defaults %>
</head>
<body>
<div id="test">Some text to change
2008 Feb 29
1
Optional data argument for a function
Dear All,
I am working on a function that has an optional data argument, just like lm(). If the user sets the data argument equal to some dataframe, then the function should look inside the dataframe for the variables given to other arguments, otherwise the variables should be accessible from what I believe is called the parent frame from which the function was called. I looked at the source code
2006 May 09
1
Reusing a model to form and link_to.
Hy guys,
Inside my app I have a form which contains user information.
Sometimes a have a form with a text_field as above:
<%= form_remote_tag(:html => { :action => url_for(:controller =>
"my_controller", :action => "my_action") }) %>
<%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2008 Sep 17
1
Dealing with missing EOL at end of file
Colleagues,
I am using R 2.7.2 on all three platforms (OS X; Windows; Linux) and I
have encountered the following problem:
I use R to issue a system call the execute a command in the OS. For
example:
system("DOSOMETHING TOSOMEFILE")
In most situations, this task completes successfully and control
returns to R. However, in rare situations, the target file
(TOSOMEFILE) is
2006 Aug 10
1
Web service SOAP URLs started failing with 1.1.4 or using 1.1.2 security patch
Railers,
I''m trying to figure out why invocations to my Web service URLs work
with Rails 1.1.2 but fail both with Rails 1.1.4 (and 1.1.5) and when I
apply the new 1.1.2 security patch to Rails 1.1.2.
It looks like they are failing with SOAP clients but succeeding with
XML-RPC clients.
The URL that used to work is of the form
http://localhost:3000/my_controller/ServiceName/api. When I
2019 Jul 12
3
RFC: changing variable naming rules in LLVM codebase
Rui Ueyama via llvm-dev <llvm-dev at lists.llvm.org> writes:
> - LLVM's `/*foo=*/`-style comment to annotate function arguments need
> to be handled automatically to make the tool scalable. So is the
> doxygen @parameter.
This is a bit of a side note, but in my own work I've more recently
tried to move from this style:
foo.h
int foo(int a, bool doSomething);
foo.cpp
2006 Dec 29
4
Remote API passing in parameter named 'action', routing loses it
I''m working with a remote API that calls a URL in my app, passing in a
parameter named action. So the request would look like:
http://localhost/my_controller?action=foo
Routing correctly interprets the controller action as index. However,
it sets params[:action] to index as well. I know that''s how it''s
supposed to work...but it means I lose the action parameter
2019 Jul 12
2
RFC: changing variable naming rules in LLVM codebase
David Blaikie <dblaikie at gmail.com> writes:
> Why would enums be less elegant than named boolean constants as you've shown here?
Casting, mainly. If the parameters were also changed to an enum type
that would be fine too, probably better than inline variables even.
> http://jlebar.com/2011/12/16/Boolean_parameters_to_API_functions_considered_harmful..html
> (at a random
2006 Aug 08
1
Named routes and url generation?
Hi all
In my application I''ve some named routes defined this way...
map.label_context1 '':context1/label'', :controller => ''mycontroller''
map.label_context2 '':context1/:context2/label'', :controller => ''mycontroller''
map.label_context3 '':context1/:context2/:context3/label'', :controller
=>
2005 Mar 02
2
form action in mail (actionmailer)
Hi everyone. : )
I meet problem when use form tag in actionmailer. (content-type is text/html, surely)
I want to use form action in actionmailer''s view (.rhtml) for some reason.
1. I use start_form_tag helper method as normally, but how I can ?
I did <%= start_form_tag :action => "http://myhostname/mycontroller/myaction" %> or
<%= start_form_tag :action =>
2005 Jan 25
0
Goto invalid extension doesn't go to 'I' when in a macro.
Hi,
A bit of a problem here which I'd appreciate some thoughts on.
(please excuse the stray capital letters - Outlook has a habit of
capitalising where I don't want it to!)
For various reasons, I need to be able to do the following:
--------------8<--------------
[default]
Exten => s,1,Macro(dosomething,9999)
Exten => s,2,NoOp(Returned)
[macro-dosomething]
Exten =>
2019 May 27
1
"if" function in pure R?
Thanks a lot Jiefei,
I had thought of defining a binary operator (inspired by pipes) or simply
using an additional condition in the if() calls [e.g. if(foo & fn(bar))
doSomeThing; with fn(bar) returning a logical], but both are workaround
that I do not find as elegant as a proper control-flow construct.
Thus two questions remain:
- is it possible to create a control-flow construct in pure R?
2007 Apr 05
3
Extending assigns in controller specs?
Hello,
I am interested in enhancing assigns in controller specs to do
things like the following
assigns[:key1, :key2, :key3] #=> vals for keys
Is there away to "break open" this construction to overload the :[] operator?
Thanks.
-Chris
2013 Sep 24
0
[LLVMdev] LLD: Returning true on success
On Tue, Sep 24, 2013 at 12:33 PM, Rui Ueyama <ruiu at google.com> wrote:
> Hi LLD developers,
>
> I'm about to make a change to invert the return value of Driver::parse()
> to return true on success. Currently it returns false on success.
>
> In many other functions, we return true to indicate success and false to
> indicate failure. The inconsistency is confusing,