Displaying 20 results from an estimated 1000 matches similar to: "Re: Listing user jobs"
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
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 Apr 18
2
link_to_function onmousedown
Hi,
Is there some way to produce an anchor that looks like the following
using helpers, or should I just code it in the rhtml like this?
<a href="#" onmousedown="javascript:foo(); return false">
Thanks,
Brad
--
Bradley Mazurek
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
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]
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
2011 Jun 14
1
Setting up RODBC or RMySQL package.
Hi all,
I have installed RODBC package. But am not able to connect it for using
MySQL. For accessing MySQL Db a connector is required.For that can i use the
mysql db which is a part of WAMP server or use separate mysql db.
I know there is a package called RMySQL. But i find it very difficult to
install the RMySQL package under .Which is better one for accessing MySQL
Database.
Thanks
Amrita
2001 Nov 07
2
Flaw in empty password authentication in sshd
The auth-pam.c of sshd server contains a small flaw that allows empty
password logins even if "PermitEmptyPasswords" option in the sshd config
file is set to "no". The scenario is as follows:
Using ssh the user tries to logon to the machine using an account that has
empty password. If the user presses enter on the password prompt (NULL
password) access is
2007 Apr 21
0
Collapsible Hide/Show DIV
Hi there. I posted this before but wanted to change the subject. I
want to have a collapsible div inside of a for loop. I''ve been messing
around with it and could only get 1 item out of a few to be able to
hide. I''m just using this:
<script language="javascript">
function toggleDiv(divid){
if(document.getElementById(divid).style.display ==
2006 Apr 12
3
acts_as_authenticated trouble
First off, I''d like to address that I''m n00bs.
I''ve read the README and blogs associated with this plugin, and there
really isn''t too much documentation. I have the newest version of
rails,ruby, and acts_as_authenticated installed.
#The setup
I set up the acts_as_authenticated in the following manner.
*created a table called "accounts" in the
2010 Jan 22
5
Rails Render Issue
Hi,
I am adding login functionality to my app which has two controllers
users and photos and i am having some trouble.
In my users/index view
<%if logged_in? %>
<%=render "photos/index"%>
<%else%>
.... Home page With login.....
<%end%>
In my photos/index view
<%if logged_in? %>
.... Welcome page .....
<%else%>
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
2008 Mar 07
0
ActiveRecordStore: cleanup & avoiding duplication
Hi,
I''m using ActiveRecordStore to track user sessions.
I''ve used as a base the next sources:
- http://blog.levicole.com/articles/category/ror
- http://matt-beedle.com/2006/12/13/rails-how-to-find-out-who-is-online/
- http://www.williambharding.com/blog/?p=99
This is what I currently do:
IN SESSION CONTROLLER
def create
self.current_user = User.authenticate(params[:login],
2014 May 06
0
Supporting smartcard readers with PIN entry keypads
Folks,
Find below a minor patch to allow the use of smartcards in readers that have their own
PIN entry keypads (Secure PIN entry) such as the SPR332 and most german/medical
chipcard devices.
Tested on Solaris, FreeBSD and MacOSX against various cards and drivers.
I?ve left the pkcs11_interactive check in place. Arguably - with some Secure PIN readers
it may be better to move this just in front
2014 May 12
0
[patch] Supporting smartcard readers with PIN entry keypads (updated against -HEAD)
Repost; updated for HEAD and tested on ubuntu as well.
Dw.
Folks,
Find below a minor patch to allow the use of smartcards in readers that have their own
PIN entry keypads (Secure PIN entry) such as the SPR332 and most german/medical
chipcard devices.
Tested on Solaris, FreeBSD, Linux and MacOSX against various cards and drivers.
I?ve left the pkcs11_interactive check in place. Arguably - with
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
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] =
2008 Oct 07
7
Rails production version not accessible from other machines
Hi,
I just deployed my first rails application in production mode using
Capistrano and mongrel clusters. Here are the lines in my
mongrel_cluster.yml file.
cwd: /myrailsdeploymath/current
log_file: log/mongrel.log
port: "8000"
environment: production
address: myserver.mydomain.org
id_file: tmp/pids/mongrel.pid
servers: 3
My development and production machine are the same.
When I run
2006 Apr 20
0
Tvs Plasma notebboks E-gold apy
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script>
<!--
document.write(unescape("<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<script language="JavaScript"><!--
var hellotext="