similar to: Routing problem

Displaying 20 results from an estimated 2000 matches similar to: "Routing problem"

2007 Jul 24
4
spec''ing helpers that use controller
Hi all, I''m in the process of creating rspecs for my helpers. One of the helpers in app/helpers/application_helper.rb looks like this: def page_name @page_name || "Define @page_name in #{controller.controller_name}::#{controller.action_name}" end The rspec is simply: it "should something" do page_name end
2006 Mar 22
4
Problem with ACL plugin system
Don''t know if anyone else has experienced this but I''m having a problem with the access_denied method in Ezra''s ACL access control plugin. It''s working fine (in conjunction with acts_as_authenticated) until it comes across a user it denies access to, in which case it throws the following error: NoMethodError in Admin#index protected method
2006 Jul 22
4
Accessing the controller name in your views?
I need to know what controller and action the user is currently in to do various things in my layouts/application.rhtml file. Isn''t there is a better way than: <% if params[:controller] == "whatever" && params[:action] == "whatever" %>some html<% end %> I know in the controllers you can just use controller_name, but that is not provided
2006 Jul 12
3
How to get the current URL?
Hi, how can I get the current URL withing a controller? There seems to be no appropriate method in ActionController::Base. I''m creating a site, which requires a login for some pages. I''m using before_filter for authentication. My idea was to store the currect URL in a session before redirecting to the login page and then redirect to this URL after successful authenfication.
2008 Dec 07
2
Strange 500 Error with namespace::controller#action appearing in reload only
The portion of the log linked below is two requests directly out of the log file for the same action. The first request was from me putting the address in the browser directly (but can be duplicated by linking to the url anywhere in the app). When I reload the browser on this url, I get a strange error. To the user, the action appears to load fine, but I''m getting a 500 error in the log
2006 Jan 03
1
RequireResourceHelper for JS and CSS
The following was posted on my blog at http://blog.inquirylabs.com. A friend of mine recently expressed interest in this code snippet, so I thought I''d send it out to anyone else who''s interested. This module makes it a lot easier to ''require'' javascript and cascading stylesheet dependencies inside your views or controllers. By
2007 Jul 26
6
response.should_not redirect_to
Hey, May be it is just too deep night over here and I''m missing something though I got this failure on {{{response.should_not redirect_to}}}: ''QueuesController should allow authenticated user to access ''show'''' FAILED Matcher does not support should_not. See Spec::Matchers for more information about matchers. Also I''ve found this in
2006 Jun 30
8
before_filter: nil vs. true vs. false
Folks, My understanding of how filters work is that I should return true if everything is ok and false if not. How does the filter below work then (from the Rails Recipies book)? It would return nil if there''s a user in the session. Does nil count as true? before_filter :check_authentication def check_authentication unless session[:user] session[:intended_action] =
2006 Jan 02
2
Dynamic form tags
Hi all, I''m happily using "HowToReuseEditViewsForNewViews" found at: http://wiki.rubyonrails.com/rails/pages/HowToReuseEditViewsForNewViews There''s this comment there saying you only need the tag "<%= auto_form %>" when using the code below. Can somebody tell me if that will work when extending it with model_name (some how)? I have several new_*
2008 May 28
1
Search&replace string?
Hi there, I would like to know if it is possible to modify a text file with a R function. In fact I would like to know if a function "Search & Replace" exists. My problem is to create config files from a Base file in which I have to modify values of parameters. My Base File: #... #... Param1= V1_1 #... Param2 = V2_1 Param3 = V3_1 #... What I would like for each created file
2010 Sep 06
5
how to call rails method from javascript method.
hi I wanna call rails method from the javascript method. It should be ajax call for rails method. please help me. -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe
2012 Dec 13
1
PLEASE REMOVE FROM LIST SERVE NOW!
PLEASE REMOVE ME FROM THIS LIST SERVE IMMEDIATELY!!!!!! On Wed, Dec 12, 2012 at 6:41 PM, dada <paxkn@nottingham.ac.uk> wrote: > Hi > I would like to do neural netowrk analysis on my data. It look like this: > > drug param1 param2 param3 param4 param5 class > A 111 15 125 40 0.5 1 > B 347 13 280 55 3 2 >
2006 Apr 11
4
wrong number of arguments (2 for 1)
Hi, Im having trouble figuring out how to query my database in ruby and i''m hoping someone can help me out. I''d like to find all my departments that match a permalink passed from the url. The department must also match a particular category, also passed through the url. I have written the following code. But unfortunatley I get an error "wrong number of arguments (2 for
2006 May 25
1
Built-in var. action_name for controllers?
All, In the Recipes for Rails Authentication recipe, there is a variable named action_name that''s used to represent the current action. Where does this come from? Is there a similar variable for the current controller? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2011 Sep 16
1
copula con marginales multivariantes
Hola, Quiero saber si es posible programar una cópula donde las funciones marginales son multivariantes, siguiendo el esquema del package ''Copula''. Es decir, Copula(F(x,y), G(w,z))) En el caso de funciones marginales univariantes, un ejemplo de la normal multivariante quedaria de la siguiente forma,
2006 Aug 12
7
Redirect back to last page?
I have a few pages where a user may do something (add tags, login, etc) and I would like to redirect them back to the last page they were at before calling that action. Is there an easy way to do this? -- Posted via http://www.ruby-forum.com/.
2003 Oct 28
1
error message in simulation
Dear R-users, I am a dentist (so forgive me if my question looks stupid) and came across a problem when I did simulations to compare a few single level and two level regressions. The simulations were interrupted and an error message came out like 'Error in MEestimate(lmeSt, grps) : Singularity in backsolve at level 0, block 1'. My collegue suggested that this might be due to my codes
2006 Jul 18
5
a best way to write this.
I have a form, with 3 fields, then in my controller I get the paramters to run a query but I don''t want to filter with paramters if they are nil or blank... I''m doing this @condition = '''' if(params.....) @condition = @condition + " myparamter = " + params[..... if(params.....) @condition = @condition + " myparamter = " +
2006 Jan 12
4
If statement based on a action
Question for you all is it possible to use an action in an if statement? I am using the same form for edit and new and I have a cancel button on the page. This cancel button is built with an if statement that looks right now to see if a parameter exists to define where to go back to if the user cancel. The problem occurs when the user submits the form and there are missing fields by
2006 May 23
3
image_tag problem
Hiall, I want to make an image_tag from within a controller in order to be able to present a link (with a status image) in a view. Here is my controller method (in file webca_controller.rb, hence WebcaController) def untouched_status_image_tag image_tag("open", { :alt => "Offen", :title => "Offen", :size => "12x12", :class =>