Displaying 6 results from an estimated 6 matches for "require_login".
2007 Oct 16
6
Failure trying to test ApplicationController
...of my other controller tests, but am getting
a nil.rewrite error. Below is what I have...
describe AccountController do
it_should_behave_like ''Application controller''
end
describe ''Application controller'', :shared => true do
it ''should fail require_login check if not logged in'' do
User.current = nil
controller.require_login.should be_false
response.should redirect_to(:controller => ''account'', :action => ''logon'')
end
end
def require_login
return true if User.current.logged_in?...
2006 Apr 18
4
Mixin variables
I''ve created an access control module that I''m including in several
different controllers. Everything works fine, but I want to allow each
controller to override the default login page with something like this:
set_login_pages :secure => ''my_login''
In my module, I''ve set up the set_login_pages method like this:
def self.included(base)
2008 Jun 03
8
@@state_secret
I was having some issue getting the class variables in
Camping::Session to work with some old apps, so I''ve changed
@@state_secret to a method.
module Blog
include Camping::Session
def state_secret; "kxxxx" end
end
Also, merged some of zimbatm''s patches. And trying to revive the
Junebug wiki <http://github.com/why/junebug> since it''s still
2006 Jun 07
3
Silly question re: scoping of controller actions
Say that there''s a piece of functionality I want to call everytime the
controller is invoked, regardless of what action I am calling. Where do
I put that, exactly?
Can I do that?
--
Posted via http://www.ruby-forum.com/.
2006 Jan 30
14
RoR admin system
I''m preety new at RoR (and programming), I tried a few tutorials, and
really like the RoR simplicity, but my knowledge of the framework still
isn''t very good (to be true, i understand the basics, but not everything
that''s in the tutorials).
But still I''d like to create a website which has:
- front end interface (with no edit functions)
- admin interface
2008 Mar 11
0
detecting if in the FB canvas
I have been checking the params for params[:fb_sig] to detect if the
client is in the Facebook canvas, but those don''t work at the
beginning of a controller when you''re calling before_filters.
I have a require_login in the before_filter, but I want to skip it if
the user is from Facebook. So are there any other ways to check that
the client is coming from the canvas?