Displaying 20 results from an estimated 20000 matches similar to: "can you use only with skip_before_filter ?"
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi,
I just installed Rails 2.0.2
[root@mymachine easyx]# ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
[root@mymachine easyrx]# gem install rails --include-dependencies
Need to update 16 gems from http://gems.rubyforge.org
................
complete
Successfully installed rails-2.0.2
[root@remandev easyrx]#
But I''m getting this error in my restful_authentication
2006 Mar 29
0
Bug with skip_before_filter?
There seems to be a bug with skip_before_filter using the :only or
:except conditionals.
Or am I using them completely wrong?
I have this code:
The result is that :test_filter is skipped for both index, and
index_no_filter.
application.rb
# Filters added to this controller will be run for all controllers in
the application.
# Likewise, all the methods added will be available for all
2009 Mar 09
0
skip_before_filter :verify_authenticity_token make session data not accessible.
Hi all,
I''m stucked in following situation: I implemented image upload feature
using swfupload. The submission from swfupload cause exception
ActionController::InvalidAuthenticityToken (rails 2.2) -
understandable because swfupload doesn''t send valid token. I try to
temporarily turn off the checking in the controller by using
"skip_before_filter
2006 Feb 21
0
acl_system plugin first look
Friends-
Here is another plugin hot off the presses of the three day
weekend ;) Its a role based authorization system. I have been talking
with Bill Katz about this system so it ties in with his recent
announcement as well. Its just my implementation.
Its an acl/role type system that can sit on top of the
acts_as_authenticated login system or any login system that
implements a few
2006 Jan 29
3
SHLG and lib dir
Slowly figuring out how to get my SaltedHashLoginGenerator stuff working. The wiki page
says to put "before_filter :login_required" in the user (my "user" is "member") controller
or in ApplicationController. However, wherever I put it I get NoMethodError.
The rest of the SHLG stuff seems to be working... or at least I could get to the signup
page, register, and
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
2008 Jun 13
3
before_filter order of execution
Hi
I''m trying to use before_filter to allow access to a site. Only logged
in users can view any object in the controller, but only users with a
access_level higher than 2 can view specific objects. My code is:
-----------------------------------------------------------
IN USER_CONTROLLER
before_filter :login_required
before_filter :access_granted, :only => [:destroy, :new , :edit]
2006 May 17
0
class filter: cannot call protected controller methods
Greetins all,
I''m rewriting a filter from the method form to a class filter.(see
below)
Problem: some controller - redirect_to - and route - *_url - methods are
protected (redirect_to, f.ex.), and cannot be called.
Is this intended?
Is there a solution workaround?
TIA
Alain
BEFORE:
-----------
before_filter :login_required, :except => [:welcome,:login]
def
2008 Jun 25
2
How to escape from the before_filter for the particular acti
Hi,
We use the following code in the ApplicationController.
before_filter :login_required
Iam aware, this will be called for every action.
How to escape for the particular action?
Thanks,
Ayyanar. A
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Oct 09
1
restful authentication - filtering out login ??
i am unable to reach the login page when adding ''before_filter
:login_required'' to the application controller.
I HAVE added the following to my sessions controller
''before_filter :login_required, :except => [:new, :create, :destroy]''
I figured this would overload the app controller filter but i get this
loop while it looks for sessions/new and isnt allowed
2006 Dec 11
0
auth_generator 2.0.1 undefined method `login_required' for ... ArticlesController
I am a relative RubNub and attempting to implement auth_generator v.2.0.1.
I am getting an "undefined method `login_required'' for
#<ArticlesController:0xb732c0b4>" error when I attempt...
http://localhost:3000/articles/new
Help would be appreciated.
My app/controllers/application.rb reads...
------------------------------------------------------------------------
2007 Aug 21
2
using restful_authentication current_user inside controller specs
I''m using restful_authentication in my app and I have the before filters in
my application rhtml:
before_filter :login_required
around_filter :set_timezone
around_filter :catch_errors
Currently I have them commented out while rspec''in but I''ll need to add them
in my specs.
def create
@ticket = Ticket.new(params[:ticket])
@ticket.user = current_user
if
2008 Sep 30
0
undefined method `authenticate_with_http_basic' for #<SessionsController:0xb6c47c44>
I am developing the rails with the flex.. I am following the tutorial
FLEXIBLE RAILS - PETER ARMSTRONG .
I followed the commands as specified in the tutorial.. my rails version is
1.2.3
and the ruby 1.8.6
I created the restful authentication and i specified the authentication..
ruby script\generate authenticated user sessions
...output omitted...
I specified everything.. It worked fine upto 500
2008 May 06
12
Why before_filter is not working?
I have been scratching my head on this one for most of the day.
Hopefully someone can help explain why before_filter isn''t working for
my codes.
In my Application controller, I have this:
before_filter :login_required, :except =>
[:newacct, :create_newacct, :passwd_reset ]
def login_required
unless session[:user_id]
flash[:notice] = "Please log in"
2009 Dec 17
2
RFC: conflict_warnings plugin
Greetings,
I was hoping to get some feedback on a plugin I wrote.
The plugin is called conflict_warnings and is currently available from
my github repository at http://github.com/EmFi/conflict_warnings
The purpose of the plugin is to provide a simple methods of preventing
data inconsistencies that could arise from multiple users interacting
with the same resource.
Under basic operation a
2006 Apr 17
2
newbie before_filter question
I''ve successfully gotten acts_as_authenticated working. Currently the
before_filter line for my admin screen is like this:
class AdminController < ApplicationController
include AuthenticatedSystem
before_filter :login_required
Only issue I have now is that anyone logged in can access that screen.
I''d like to differentiate between a regular user and
2008 Jul 14
1
will_paginate paginates all instead of subclass
I''m still a newb but having fun - Any help on this problem will be
much appreciated.
I have mymodel Call.rb
class Call < ActiveRecord::Base
belongs_to :user
has_many:visits, :dependent => :destroy
has_many:visits do
def latest
find :all, :order => ''id DESC'', :limit => 3
end
def all_latest
find
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
2006 Jul 29
2
Instance Variables within Controller during AJAX request
Hey all,
I''m trying to do something sorta simple...
There are three button ids: ''view'', ''build'', ''search''
My controller looks like this:
class RandomController < ApplicationController
before_filter :login_required, :except => [:index, :initialize]
def initialize
@mode = ''view''
end
def index
2010 Jun 17
7
Why do rails calls a method when I'm calling a property?
Well, I''m starting on RoR, so I got a Book called simply
rails...Following the steps in it sometimes when I try to call a
property, the browser shows me the next exception:
undefined method `name'' for nil:NilClass
I don''t know why...here''s my controller:
#Controller starts here
class StoriesController < ApplicationController
before_filter :login_required,