Displaying 20 results from an estimated 8000 matches similar to: "redirect_to POST?"
2012 Sep 17
1
require current_password to update user information
Rails newbie here, I have been stuck on this for two days and can''t figure
out why its not working.
I want users to confirm/verify themselves by entering their current/old
password before any information is updated.
This is what My user_controller update action looks like
I''m currently using rails 3.2 with the basic has_secured_password
authentication that comes with it.
def
2006 Mar 30
1
flash, before_filter and redirect_to
I leave a notice in the flash and do a redirect from a before_filter.
Can someone confirm that the first request after this, i.e. the page I
redirect to, doesn''t/isn''t supposed to clear the flash?
--
View this message in context: http://www.nabble.com/flash%2C-before_filter-and-redirect_to-t1367103.html#a3665933
Sent from the RubyOnRails Users forum at Nabble.com.
2009 Feb 08
2
SocketError in EmailController#correspond
SocketError in EmailController#correspond
getaddrinfo: no address associated with hostname.
Please see above, these are the errors i get when i try to email a user
on my networking site. Can you help please.
Actionmailer address = smtp.vodafone.ie
Below is code used for the email controller in
apps/controllers/email_controller.rb There doesnt seem to be any code
missing. Can someone help with
2011 Feb 06
2
Difference in redirect_to behaviour (Firefox, IE 7)
Hi,
Using Rails 3.0.3 on Ubuntu 10.
In my application controller I have a before filter which checks
where or not a User has some comment records. If no comment
records our found, a redirection is issued
to the main page.
All my rspec/cucumber tests passed.
So I thought start the server and see what happens
when I use Firefox (3.6) or Internet Explorer (1.7)
Scenario:
Firefox
User navigates
2009 Apr 24
4
Undefined method "redirect_to" in before_filter
Code sample:
class SomeController < ApplicationController
before_filter do |c|
add_crumb "Blah", "/blah" #breadcrumbs plugin
redirect_to :controller => "foo", :action => "bar" unless c.send
(:has_package?)
end
# Rest of the controller...
private
def has_package?
# A bunch of logic work to check to make sure
# somebody''s session contains
2007 Jun 01
0
Okay, new question - dealing w/ logging in restrictions (controller?)
Hey all, so if you read my previous thing about nested routes - I''m
just not going to do with them anymore.
Anyway, so my controller has a before_filter on the edit action; which
checks to see if the current post''s user, is the same as the currently
logged in user, if true then they can edit, otherwise not.
def check_user
if current_user.login != @post.user.login
2006 Apr 11
1
Double redirect
I have two before_filters for my application that both redirect. The
first checks whether there is an active session and if so, whether it
has timed out (a la the recipes book). This is run from
ApplicationController. The second filter is in use throughout most of
the app and checks to see whether the user has the correct credentials
to view the controller. This is run from individual
2008 Mar 24
2
link_to_remote and restful routes/urls
is there a way to access a restful resource with mike''s new
link_to_remote helper?
something like:
<%= link_to_remote h(user.name),
:update => "div_id",
:url => user_url(user) %>
of course, that doesn''t work.
i have also been trying things like:
:url => controller.asset_host +
2018 Jul 27
0
Imap post-login script
Dovecot v.2.2.32 and I have configured two imap post-login scripts and it
seems like after successfully login scripts are not closed
(dovecot_node/imap imap-postlogin : multiple processes are running still)
and after some times there are too many processes
and the limit is reached (imap proces_limit 1500):
1)
#!/bin/sh
case $IP in
10.10.1[1-2][0-7].*) exec "$@" ;;
2007 Aug 15
4
nuby: how spec redirect_to at ApplicationController
Good morning rspec people!
Still rspec nuby: I must do something wrong obviously.
How can I spec about redirect_to at ApplicationController
describe ApplicationController do
it "method login_required should redirect to home path without login" do
pending "I tried to use controller.login_required.should be_redirected
and got NoMethodError with nil object
2009 Jan 16
16
Testing arbitrary post action parameters
I am working on our (newly renamed) authentication feature. The current
scenario is:
Scenario: Non-administrators should not set administrator ability
Given I have no users
And I add a user named "admin" as an administrator
And I add a user named "myuser" as not an administrator
When the user named "myuser" authenticates
And the user
2006 Mar 24
6
login forms , redirect_to and ajax-scaffold problems
Hi,
I have a standard type authentication technique direct from AWDWR, so there is a
before_filter :authorize_employee, :except => :login in my employees_controller.rb
the authorize_employee is in application.rb
def authorize_employee
unless session[:employee_id]
flash[:notice] = "Please log in"
# save the URL the user requested so we can hop
2011 Jun 01
7
desperate, errors with file upload
hello,
i implementing a file upload using paperclip plugin. i getting the
following error [1] when uploading a file. I''m using the gems rails
v2.3.8 and paperclip v2.1.6. the parameter hash looks like [2], the
model like [3].
Interesting is that i get two different errors, on the localhost with
webrick it says:
Status: 500 Internal Server Error
no marshal_dump is defined for class
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
2006 Mar 30
4
redirect_to("url") with post?
Is there a Rails-friendly way to redirect_to an url and post some
parameters with that?
I''ve tried:
redirect_to("http://whatever.com", { ''postme'' => ''this'' })
redirect_to("http://whatever.com", :post => { ''postme'' => ''this'' })
redirect_to("http://whatever.com", :options
2006 Jun 11
0
redirect_to and post parameters
Hey fellow coders!
I need to redirect a user request to another server. I also need to pass
some parameters to the target action. One of the parameters is a text
string, which can in some cases be very long (too long for GET). I
therefore need to send the parameter as HTTP POST parameter. Is that
possible?
//Daniel
--
Posted via http://www.ruby-forum.com/.
2013 Mar 20
2
Rspec + Devise + BaseController
Hello there,
I''m creating a base controller for the admin section of a project. All
controllers whitin the admin section will inherit from it.
#####################################################
#app/controllers/admins/base_controller.rb
class Admins::BaseController < ApplicationController
layout "admin_cms"
before_filter :authenticate_admin!
end
2006 May 16
2
before_filter and the application controller
Hi there,
I''m having a bit of an issue with my before_filter. I know that the filters
put in the application.rb controller are global for all the controllers. In
my application filter I''d like to allow access to the RSS feed method in a
''member'' controller and skip the login checks that the before_filters are
currently performing.
In my application my filters
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
2017 Nov 09
2
Postlogin script
Hi,
I would like to prepare postlogin a script that allow imap connection to
roundcube for all but restrict imap access for selected users.
My question is that:
Is possible in condition IF use IP addresses as range or with mask (because
I've more than one web servers) ?
My script:
#!/bin/sh
if [ "$IP" = "172.11.0.28" ] ; then
printf "* [ALERT] Access allowed from