Displaying 20 results from an estimated 11000 matches similar to: "Flashing Login Notice To Non Authenticated Users"
2009 Aug 06
13
Redirect after login
Hi,
I''m new to Ruby/RoR so please bare with me!
I''m trying to adapt a ruby setup where someone logs in to a bonjour
service via a web browser. I have the login screen which asks for host
and password. There is only one user per host and i can log in fine.
It''s suppose to redirect me to /list in my browser but
doesn''t. Once i''ve entered the correct
2006 Mar 02
8
User Authentication
I''m trying to create a simple authentication system but am failing
miserably. I''m (sort of) following the "Logging In" chapter of the Agile
book. Ideally, any access to http://example.com/publish (and any of its
subdirectories) should redirect to http:/example.com/publish/login when
there is no valid session user_id.
Code so far:
2006 Aug 02
12
Authenticate with an IP address : LoginGenerator
Is there a way to authenticate with an IP address? I''m using the
LoginGenerator, but would like to bypass the "before_filter
:login_required
" if a user is in a correct IP range...
Anyone know of a solution?
Thanks!
--
Posted via http://www.ruby-forum.com/.
2009 Jul 09
8
Only One Controller + Urgent
Hi Champs,
Need Help .. :(
Actually the thing is that i am having many controllers a, b, c and d..
But what i want it that only "a" should be displayed to the users .. b,
c, d not ..
Is there any way to do it .. ?
Cheers ..
--
Posted via http://www.ruby-forum.com/.
2006 Feb 20
2
Problem with flash[:notice] appearing twice
In my save function in my (ajax!!!) controller, i''ve got a bit like
this:
if ...
flash[:notice] = ''NOT SAVED: This month is locked''
render :partial => ''edit''
else
save it...
redirect to ''show'' action....
...
If i try to save an entry for a locked month, it correctly brings me
back to
my edit action with the
2010 Jul 02
6
making something available application wide
I''d like to display a banner on every page. Ultimately I''ll be tweaking
which banner is displayed via different controllers but initially I''d
just like to set a single banner application wide and display it in my
"_header", a partial I include in all layouts.
I''ve got a BannerAdvert model, simple. If I''m in my welcome controller
index action
2007 Dec 03
2
before_filter application => exclude some other controllers
Hello again,
It''s possible to use before_filter in the application_controller, and
exclude for some methods from other controllers ?
i have a before_filter in application_controller that checks if the user
is logged, if the time hasn''t expired, ... and I want to exclude some
methods of this check, like the login. This ''login'' belongs to other
controller.
I
2009 Oct 18
4
NoMethodError in User sessionsController#new
I''m setting up authentication with Authlogic and I get this error.
I''ve done some searching but with no success. I tried setting the
current_user method in Application_controller to protected and not
private, on the recommendation in Stack Overflow.
Error in browser-----------------
NoMethodError in User sessionsController#new
undefined method `require_no_user'' for
2011 Jul 13
14
Using timezone javascript to set Time.zone
I''ve got a javascript that provides me with the timezone for the
client. I want to use this to set Time.zone so that all my times
stored in the database are displayed in the timezone for the client.
So really simplistically
var timezone = jstz.determine_timezone().timezone
Time.zone = timezone.olson_tz
obviously this can''t be done. I''ve taken a look on the web and can
2006 Jun 07
6
Links on the left hand side - are components necessary?
Hello,
Maybe this is super-trivial...
I need to have a list of links on the left hand side of my application,
for *every* single page.
So, I''ve created a layout called "main" (main.rhtml) under
view/layouts, and included >layout "main"< in pretty all of my
controllers.
main.rhtml has, amongst all the other HTML stuff:
<%= render_component
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.
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
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
2006 Jan 15
8
Underscore character in session var
I stumbled across a weird problem
i can do:
@session[:userid] = 1
but cant:
@session[:user_id] = 1
The second session var doesnt set.
Is there a config setting for this?
--
Posted via http://www.ruby-forum.com/.
2006 Feb 01
1
LoginGenerator - Firefox Problem -The page isn''t redirecting properly
Hi,
HAs anyone come across this issue in Firefox;
I''ve just installed LoginGenerator and I''m allowing cookies to be set
yet any all to http://apollo:3000/account/login results in the error;
Firefox has detected that the server is redirecting the request for this
address in a way that will never complete.
Any Clues??
Eric.
2010 Jul 05
1
[PATCH] gettext initiation problem Thanks to Thibault Deloffre <tdeloffre@linagora.com>
From: root <root at ovirt.admin.virt.par.lng>
Signed-off-by: root <root at ovirt.admin.virt.par.lng>
---
src/app/controllers/application_controller.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index 4c4666e..c7f8431 100644
---
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login
test from cucumber features. The feature statement is:
Given the user is not logged in
The step definition for this is confounding me. In the
application_controller the authlogic tutorial recommends the following:
private
def require_user
unless current_user
store_location
flash[:notice] =
2012 Feb 01
6
Does Devise make use of a "status" method? Weird bug.
So I''ve inherited a legacy application and I''m trying to work around the
edges as I put an admin tool interface on top of the existing code base.
I install Devise for user authentication, since I''ve used it in the
past. I change none of the default code. And yet, on successful sign
in, I get an error:
Render and/or redirect were called multiple times in this action.
2006 Apr 21
9
Yet another dry question..
One of these days I''ll figure this out, but in the meantime help me be a
better programmer by eliminating some excess code:
I''m trying to check to see if somebody trying to view/edit/update a
product is the owner. In my scaffold I have this code that works:
def edit
@owner = Product.find(params[:id].to_i)
if @owner.user_id == @user.id
@product =
2010 Mar 31
1
[PATCH] Upgrading the server to work with Rails 2.3.4.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
src/app/controllers/application_controller.rb | 2 +-
src/config/environment.rb | 2 +-
src/config/initializers/new_rails_defaults.rb | 6 +++++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb