similar to: passing a redirect_to action through a view to controller.

Displaying 20 results from an estimated 20000 matches similar to: "passing a redirect_to action through a view to controller."

2006 Aug 06
6
View passing empty or no value to controller -- help
Hi, I have the following view: <%= start_form_tag ( { :action => ''find'' }, :method => ''get'') %> <p> <%= text_field_tag :lemma, params[:lemma] %> </p> <%= link_to "Find It", :class => "submit" %> <%= end_form_tag %> And the following find action in the controller:
2008 May 08
0
Controller/action not working in url
Hey guys, i am facing some problems in calling an action. see details: in sale_items controller, i have a function def saleedit --code-- render ( :action => ''saleedit'') end and i have a file in view/sale_items/saleedit.html.erb. okay. now i have one more view view/sale_items/new.html.erb. in this file i have a form like this: <% form_tag url_for(:action =>
2006 Apr 13
0
redirect_to or link_to mapped url. any other way than "../../smth"?
Hi all, I''ve got my urls mapped so that http://myapp/url is the same as http://myapp/start/show/url. Is there any way to use "redirect_to" and "link_to" in this case? Currently I just use redirect_to("../@url") but perhaps there''s some way to make it properly, with :action etc. sabon -------------- next part -------------- An HTML attachment was
2006 Mar 13
1
issue with redirect_to
Hi all: I can''t make redirect_to to unlock the current iframe using {:TARGET => "_top"}. It always stays in the current frame. I checked the redirect_to code, it seems the method does not use "target". here is the source code of redirect_to from ActionController::Base def redirect_to(options = {}, *parameters_for_method_reference) #:doc: 753: case options
2006 Mar 09
3
redirect_to :back question
Hi! How to use this? I can declare it only inside a controller, so i tried to do add this to application controller: def back redirect_to :back end so i could call in all my views link_to ''back'', :controller => ''application'', :action => ''back'' but it doesn''t work - there are no errors, but i''m still on the same
2006 Mar 31
1
url_for leave out ''index'' action
I''m trying to reduce the size of urls in my app and i was wondering how i can get all links to an index action to leave out the ''index''. In my routes.rb, i have it setup to recognize the controller and default to the index action. But is there a way to make it so that the ''index'' portion in the url is not shown to the user? This is mostly a concern
2006 Dec 30
1
redirect_to(:action => ''foo'') and return
I''m not sure why this is happening, but if I do this in a controller unless @variation && @variation.quantity > 0 flash[:error] = "Sorry, that product is currently not available." redirect_to(:action => ''error'') and return end rspec tells me 2) ActionController::DoubleRenderError in ''The Carts controller with an
2011 Feb 12
5
link_to a action in the controlles is not called
i have a link where it has to call a method defin in todoscontroller named say_when but show is called <td><%= link_to ''Say when'', todo, :action => :say_when , :remote => true %></td> class TodosController < ApplicationController # GET /todos # GET /todos.xml def index @todos = Todo.all respond_to do |format| format.html #
2008 May 11
3
Get current controller name/action name from view
Hi. I swear I found this in the group archives, but now I cannot find this in the group or elsewhere online! In a view I would like to get the current controller name and action that was used to get here. For example, I have a template that I''m using from two different controllers (and four different actions in each controller), such as :controller => "my_view", :action
2006 May 08
4
link_to - Going Back without knowing the action name.
Hi, I have a bunch of link_to''s in my code that are simple Back buttons that should basically just go to the previous request. Is there a way of doing this without specifying the action to execute? The problem is, sometimes I may render the same view through separate actions so I wouldn''t know which action to go back to. Thanks. -------------- next part -------------- An HTML
2006 Jan 27
0
redirect_to(:action => ...) usage?
I''ve a number of places in my rails application where I have redirects, but I find they are not always redirected. I think part of the problem is that my understanding of pre-requisites is insufficient. I''m not sure how to frame a search to get the answer I need. I''m using Rails 0.14.3 under cygwin with ruby 1.8.2 How do I make sure that data received in @params[] on
2009 May 07
5
Controller redirect_to to leave iframe
Inside an iframe, I want the controller to redirect_to to the parent (i.e. target =''_parent''). Any ideas? (Everything I''ve tried- via redirect_to - just keeps it inside the iframe)
2005 Dec 17
0
Passing multiple parameters with select-option to controller
Hi all, I''m using Windows Xp, Mysql 5, Webrick, Rails 1.0 I''ve 3 tables which have HABTM relationship. My tables names are all set to uncountble. Name of tabels are anabilimdali (includes department info id name etc.), ogretimuye (personel information like id , name , dept. ) yayin (document information), and for relationships yayin_anabilimdali , yayin_ogretimuye . The
2006 Aug 17
0
super-newb needs help with has_many and other things...
I am brand new to oop and am having a difficult time getting my head around some ruby stuff. In specific, I am trying to create a library style app that lists topics, articles and comments. I have a table called topics, a table called articles and a table called comments. My models, controller and view are all listed below. What I want to happen is to have the list view list each topic along
2006 Apr 03
3
render :partial + redirect_to :controller
This is of course disallowed, which I discovered only after nearly completing my spanking new ajaxified UI. What is the motivation behind this, and what is the best workaround? This UI does a scriptaculous drag-and-drop of items from a first div (div1) over to a second div (div2), which triggers the contents of div2 to be updated to reflect the drop. No prob, thus far. But then the
2006 Jun 15
4
redirect_to outside of a module
Hello List, If I have a module and the address looks like / admin/:controller/:action and I want to create a link to /:controller/:action, how do I have to specify that in a ''link_to'' or in a ''redirect :controller =>'' statement. It doesn''t strip the /admin part from it, which makes sense, but I need to go to a controller in the root. TIA,
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here: http://railstutorial.org/chapters/sign-in-sign-out#top At the end of the tutorial, rails is erroring (see below). being new to Rails and after having checked the tutorial... How do you resolve this kind of error. It''s saying current_user is not defined, and it is supposed to be defined with/Sites/sample_app/app/helpers/
2006 Jan 18
5
redirect_to with an anchor, how ?
Hello, I try this : redirect_to :action => ''infos'' , :id => params[:id] , :show => "comments#a" i want this : .../infos/15?show=comments#a but I have this : .../infos/15?show=comments%23a Someone could tell me how generate an anchor link ? Thanks
2009 Sep 19
5
How to: redirect_to through a folder hierarchy (upwards)
Hi there, how do I tell the current controller correctly to redirect_to an action of another controller that is 1 level higher in the folder hierarchy than the current controller? How I have tried: Within the current controller (called ''incidents''), I have put: redirect_to :controller => ''members'', :action => ''show'', :id =>
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