similar to: Change redirect after method ''redirect_to''

Displaying 20 results from an estimated 6000 matches similar to: "Change redirect after method ''redirect_to''"

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 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
2006 Jul 15
1
Redirect_to from initialize method
Hello, I''m curious as to why this bit of code doesn''t work: -- class SignupController < ApplicationController def initialize signup.call end def signup redirect_to :action => "signup_form" end end -- You have a nil object when you didn''t expect it! The error occured while evaluating nil.rewrite -- Whereas if I comment the
2006 Apr 17
2
probably easy q: flash before redirect
I''m a little perplexed why this isn''t working: private def check_authorization user = User.find(session[:user]) if user.level == 100 flash[:notice] = "welcome, admin" else flash[:notice] = "ha ha" redirect_to :controller
2005 Jul 06
6
DoubleRenderError exception
The DoubleRenderError exception recently introduced is forcing me to go back and rewrite my apps authentication handler. Before I could do a redirect right in the middle of a request. Whatever was happening after that went unnoticed, I assumed it was simply ending the request after the redirect was called, but apparently it was going on and rendering the page. Why can''t a redirect
2006 Feb 20
3
Background work
Greetings, I''ve got a rails app which is basically an admin interface to a xml dataset. Currently I''ve got rails rigged to call a function to spit the entire dataset to file with every change. This would actually be ok, its fairly infrequently updated, but when the dataset grows large the user sits there waiting for it to dump with no feedback as to whats going on. Oh yes,
2010 Mar 21
3
Error in the code Doube Render (colins')
Hi everyone, i followed colins example and it worked perfectly but now i get this error ActionController::DoubleRenderError in UserController#login Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to
2007 Nov 30
5
render_to_string in an after filter
I''m using render_to_string in an after_filter, which renders a partial that is sent to a web service. Here''s the code: class MyController < ApplicationController after_filter :post_to_webservice def show # show logic end def post_to_webservice stuff = render_to_string :partial => ''stuff'' webservice_post(stuff) end I get a DoubleRenderError in the
2006 Apr 08
2
respond_to causes DoubleRenderError?
I have a custom authentication plugin that redirects users to a login site if they aren''t already authenticated and their session hasn''t timed out. I had things working fine with straight http requests, but wanted to add support for ajax requests. I thought this would be a simple matter of replacing all of my "redirect_to <blah> and return false" calls with
2010 May 03
7
rendering images dynamically
Hi, I have a rails application where I respond to a request by fetching image urls from various web api calls and need to display them as they come available. I am able to display all the images once I get them all, but that causes an unacceptable delay for my user. One approach I am trying is, from my controller, set an @image variable, and then pass in a block to the model that retrieves the
2006 Apr 12
3
acts_as_authenticated trouble
First off, I''d like to address that I''m n00bs. I''ve read the README and blogs associated with this plugin, and there really isn''t too much documentation. I have the newest version of rails,ruby, and acts_as_authenticated installed. #The setup I set up the acts_as_authenticated in the following manner. *created a table called "accounts" in the
2007 Jan 09
1
assert_redirected_to not working as expected
I''ve installed the "acts_as_authenticated" plugin and made some modifications to the controller (app/controllers/account_controller.rb) "signup" module as follows: === def signup @page_title = ''Create Account'' @user = User.new(@params[:user]) if request.post? if @user.save session[:user] = User.authenticate(@user.login,
2011 Mar 17
7
Beta Invitation in Rails 3, little problem
INVITATION BETA EMAIL I have in the email that the app send to friend''s email address ------------------------ You are invited to ExampleApp.com click below to signup http://localhost:3000/signup.efweiuvwnjernfwkefwebhsohj ------------------------ But I have a dot in the url beteween http://localhost:3000 and the token I wish the following url
2006 Dec 19
0
Looking for a way to avoid DoubleRenderError.
The "update" action of my controllers and under certain circumstances creates a xml file on the filesystem. Using an after_filter that only gets called after the update action I create the XML file. Problem is, I get a DoubleRenderError because the update action either calls redirect_to or render. I can get around the render call by calling performed?() but the call to redirect_to
2006 Jun 08
2
LoginEngine: undefined method `generate_security_token''
Hi there, I''m trying to set up LoginEngine with Rails 1.1.2 on Ruby 1.8.4 on a Windows XP box and the log is reporting: undefined method `generate_security_token'' for #<User:0x39436a0> Rendering user/signup Rendered user/_edit (0.01600) Rendered user/_password (0.01600) Rails appears to be failing on key = @user.generate_security_token in user_controller.rb in the
2005 Oct 12
4
Validating 2 related models at once not working
Hello, I have a form that submits data to two related models/tables. One is Customer the other is Address. Validation for Customer works fine but not for the Address. Class Customer < ActiveRecord::Base has_one :address validates_presence_of :login, :password, :email validates_associated :address end Class Address < ActiveRecord::Base belongs_to :customer validates_presence_of
2006 May 16
3
UserEngine and hiding controllers
I''m using LoginEngine + UserEngine for web application. 1. I have some controllers under and admin subdirectory (Admin::PostController etc). The auto-fill permission in UserEngine does not work correctly with those controllers. Right at the moment this is not a problem, since I kind like having the Admin section separated and available only for god users. However, I could use
2006 Aug 08
4
Creating a child simultaneously with parent via form
Hi there I''ve got a user model and an address model; a user has_many addresses. A user object can be created via an html form which also allows for an initial address to be created. I''ve got a controller method working to save both objects via the form, but I suspect I can achieve this in a more rails-esque manner. Here is my controller method: def signup @user =
2006 Jul 04
1
LoginGenerator Problem
I am trying to make a barebones login system based on this example (which in turn is just standard RoR login) but when I enter a user name and password, it says the login is unsuccessful every time. I am not sure where I am going wrong. Here is all relevent information CREATE TABLE `users` ( `id` int(6) unsigned NOT NULL auto_increment, `login` varchar(20) NOT NULL default
2005 Aug 26
2
Salted Login Hash Woes
I had the Salted Login Hash Generator working at one point and then it just stoped working. It was around the time that I changed hosts and I think that it just might not be able to connect to the new server. I have tried everything though and it just doesn''t seem to work out. I''m now thinking that maybe it has to do with something else that I changed in the project. Is