similar to: Rails Render Issue

Displaying 20 results from an estimated 3000 matches similar to: "Rails Render Issue"

2008 Apr 30
4
what is .....undefined method `authenticate'
def login_submit if session[''user''] @logged_in = true else @logged_in = false end @user = User.new(params[''user'']) if session[''user''] = User.authenticate(params[''user''][''username''], params[''user''][''password'']) flash[:notice] =
2007 Oct 01
15
how to spec views
I''m trying to spec a view but haven''t done much view specing. This view render different partials depending on authentication of the user: annon, admin, player So I I''ll write if conditionals in the view with the partials it "should render signup propaganda for annon users trying to view games" do render "/games/index.rhtml"
2005 May 18
10
Salted Login Generator issues
Hello all, I''ve just installed and begun to integrate the salted login generator. So far I''m very impressed, though I''ve hit a few snags along the way. Unfortunately, I''ve met the first one that I haven''t been able to resolve on my own. When I hit the login action, I get errors in my log files. The specific error with trace is included below.
2009 Jan 12
5
Restful Authentication Uninitialized Constant in Production...
rake db:migrate RAILS_ENV=production rake aborted! uninitialized constant User::Authentication The preceding I encounter when attempting to migrate to the production database. My google powers have escaped me. Everywhere says Restful Authentication is missing in the production server. However, to validate this, I attempted this on the same server as the development, which works. So, what
2007 Jul 06
3
stubbing helper methods for View specs
Hi there I have several view specs, that include the following snippet in their "before" block to stub the methods by acts_as_authenticated before :each do @u = mock_model(User) @u.should_receive(:name).and_return("Hans Muster") template.should_receive(:logged_in?).and_return(true) template.should_receive(:current_user).and_return(@u) end this
2006 Dec 11
2
Does mongrel look at the Rails page cache?
Hi all. I''m trying to skip the Rails page cache if the user is logged in: --- # Rewrite index to check for static RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$ RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$ RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond
2006 Jul 13
8
Acts As Authenticated - smarter login box
Hi, I''ve got AAA loaded and working. I now want to put a smarter login form on the sidebar of my site. If the user is not logged in, I''d like to display a typical form in the sidebar that collects the user ID/password and allows the user to login. If the user is logged in, the box should display something like ''Logged in user: FirstName Lastname'' and a
2007 May 29
5
Trouble defining a stub method for a controller
Hello, Not sure if I am doing something really wrong (let''s not say stupid for now), but I haven''t been able to stub a controller method like: controller.stub!(:logged_in?).and_return(true) Please help, this is driving me nuts ;-) -- An?bal Rojas http://www.rubycorner.com http://www.hasmanydevelopers.com
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
2007 Jun 11
3
ActiveRecord::StatementInvalid error
Hi, I have an application that is running fine on two different machines, but when I ported the code to a third machine, it doesn''t seem to work. More specifically, for users with a significant amount of info, it seems to stop working. All the functionality seems to be working properly on a small test set, but with a larger set I get the following error: AssociatedAp Load (0.000000)
2012 Dec 13
1
Checking data migration from samba3 to samba4
How do we check the data from Samba4 that the data from Samba3 successfully migrated? I dunno if it successfully migrated coz got these (last part): [root at gaara LiveData]# /usr/local/samba/bin/samba-tool domain classicupgrade --dbdir=/srv/LiveData/var_lib_samba/samba --use-xattrs=yes --realm=kazekage.sura.sandbox.local --dns-backend=SAMBA_INTERNAL /srv/smb.conf Once the above files are
2007 Feb 11
1
Specing Rails Views
Hello - I''m currently trying to write some specs for my rails views. My views depend upon the restful authentication plugin method logged_in? Like so, <% if logged_in? %> <ul id="product-admin-nav"> <dd><%= link_to "create a new product", new_product_url %></dd> </ul> <% end %> However, when I have the following
2004 Aug 17
2
esfq hash type
Hi I have a small lan (10.0.0.0/8) behind my linux box. I use MASQUERADE to allow users connects to internet. I set up an esfq qdisc for outgoing traffic. And there is a little question. Does source hash type in esfq recognize NATed local ip''s? -- Pozdrawiam Marcin mailto:slacklist@op.pl _______________________________________________ LARTC mailing
2008 Aug 08
2
template.expect_render fails when partial is rendered from a helper
My spec; describe ''subnav rendering while logged in'' do before do template.stub!(:logged_in?).and_return(true) template.stub! (:current_profile).at_least(:once).and_return(mock_profile) end def do_render render "/homepages/show.html.erb" end it "should render the logged in partial for homepages" do
2006 Apr 23
2
Check if current route == some route
I have a before_filter in ApplicationController in which I want to check if the current location is the same as a certain route, so that I only redirect non-logged in visitors to the "join" page if they''re not on that page already. The code I came up with is a bit ugly: redirect_to join_url unless (@logged_in or action_name == "join") I''m pretty sure
2007 Jan 04
8
Common setup code and naming specifications
Hello! I have a lot of contexts for testing Rails controllers, that must do something like ''session[:logged_in] = true'' in their setup. How can this be refactored? In unit tests I would simply create a LoggedInControllerTest base class, that all my functional tests would derive from. And another small question: In my controller specifications I often have to decide whether to
2015 Mar 17
2
[patch] Updated patch for pkcs#11 smartcard readers that have a protected PIN path
Some smartcard readers have keypad to enter the PIN securely (i.e. such that it cannot be intercepted by a rogue (ssh) binary. PKCS#11 allows for enforcing this in hardware. Below patch allows for SSH to make use of this; against head/master as of today. Dw. commit 7f0250a8ae6c639a19d4e1e24fc112d5e2e1249a Author: Dirk-Willem van Gulik <dirkx at webweaving.org> Date: Tue Mar 17
2007 Jun 24
2
howto make "logged_in?" accessible to other controllers? aaa
Greetings, I am new to act as autenticated and was wondering how i can check if the user has been logged in from their account. i would like to do this so i can show things a member can do in the main site (vote, comment, etc) thanks! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
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] =
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]