Displaying 20 results from an estimated 20000 matches similar to: "Caching of collections/references on session?"
2007 Jul 01
3
Session WTF ?
Hi.
How to use session in ruby on rails ?
I try to make it work for hours, but it still doesn''t work...
In my controller I have this:
def identification
@current_user = User.new(params[:user])
ok = false
redir = ''login_failed''
@remote_user = User.find(:all)
@remote_user.each do |r_user|
if (r_user.login == @current_user.login and
2006 Feb 08
8
drag drop safari
does it not work?
works fine for me on all other browsers and platforms.
2006 Feb 07
16
Notify JS updates, oh my
Hey all,
I just wanted to let you guys know that I updated my notify script.
I still need to package it for easy download (next on my task list)
but it does what I need it to do. Any thoughts, comments?
http://thinkof.net/notify/index.html
Also thanks to those of you who helped previously.
-Greg
2008 Aug 30
3
Working with sessions in beast forum
Hey,
I''m designing an app which displays the events near a user in RoR. I''m
using the beat forum to facilitate user management/sessions/etc. I''ve
edited the sessions table in the Beast database to contain a
"session_location" value and what I''d like to do is to set this to the
users location when they log in. This would allow them to change their
2006 Mar 10
0
Session management changed in EdgeRails?
Hi,
I''ve been developing an application in Rails 1.0 and finally made the
switch to Edge for has_many :through and polymorphism. I''m currently
storing the authenticated user object (User model) in the session. This
has worked well up until upgrading to EdgeRails. What I do is set @user
= session[:user] in my controllers and then access the various @user
associations such as
2010 Apr 16
4
DEEEEPLY nested
Hello,
i have "a" has many "b", "b" has many "c", and "c" has many "d"
Now... "d" is a user model, and I have a current_user helper method
defined.
If i navigate to an "a" show page, how can I make sure that my
current_user ("d") is part of that "a"? meaning how can i make sure
that
2008 Mar 04
4
Named collection forward fetching
Hello,
I''m getting an "NoMethodError" traversing a named collection. Let me
explain
I have a named collection called best_friend in a class called user
def self.best_friend
find :all, :conditions => "designation = ''Best Friend''"
end
and if i do current_user.best_friend everything works great, I can pull
up the user''s name as
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
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
2007 Feb 21
1
setting session data from a post
I''m using acts_as_authenticated, and I''m trying to run some tests where
the user must be registered. In the past, I''ve just included a user id
in the session data.
def test_login_loads_from_post_session
post :new, nil, { :user => 7 }
session = assigns(:session)
assert_equal 7, session[:user]
end
My assert statement seems to be failing because my session is
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here:
http://railstutorial.org/chapters/sign-in-sign-out#top
At the end of the tutorial, rails is erroring (see below). being new
to Rails and after having checked the tutorial... How do you resolve
this kind of error. It''s saying current_user is not defined, and it is
supposed to be defined with/Sites/sample_app/app/helpers/
2005 Mar 10
6
images from database + caching
Is the information in
http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles on caching
images still the best way on how to cache images that are served from
the database?
I haven''t added time information to my image table yet, and the images
are sent after every single page view (even if it''s been downloaded
already).
Joe
2012 Mar 09
2
ActionMailer message delivery content
I have the ability to send email to a user if a certain user has
requested interest in their product. In my email I want to include
certain information that is pulled from users but at the moment I am
getting errors because it states that they are undefined despite these
lines being used elsewhere in my application. I shall copy the email
below and anything between the <% %> is what I wish
2007 Aug 11
2
Rspec and acl_system2 plugin
Hello,
I''m trying to spec a Rails application using the couple
restful_authentication/acl_system2 plugins.
In my admin layout, I put the following code :
<% restrict_to "admin" do -%>
<ul id="admin-tabs">
<li> /users Users management </li>
</ul>
<% end -%>
Then in my spec file
2010 Jul 28
1
paperclip, authlogic and callback issue
I use authlogic for authentication and paperclip for handling user''s
profile picture attachments.
I use the following method to get the current_user
def current_user_session
return @current_user_session if defined?
(@current_user_session)
@current_user_session = UserSession.find
end
def current_user
return @current_user if defined?(@current_user)
2009 Oct 28
1
Authlogic Page View Authentication Help
Hi:
I am a newbie at ROR, and I am grasping my head around Authlogic. I am
having hard time trying to figure out how can I do the following:
in my application controller I have the following helpers:
filter_parameter_logging :password, :password confirmattion
helper_method :all
private
def current_user_session
return @current_user_session if defined?
(@current_user_session)
2002 Jun 03
1
What is so bad about primaryGroupID=513?
I try to set up Samba 2.2.4 / LDAP as a PDC and it almost works. The
only thing I don't understand is why a domain user can't have a
primaryGroupID of 513 (which looks like it should be a safe default).
But if I set it, login is denied with an error C0000078 on the client,
and something like
[2002/06/03 10:32:28, 3] smbd/sec_ctx.c:set_sec_ctx(314)
setting sec ctx (65534, 65534) -
2008 Jan 15
0
Problem with ruby-debug and rspec
So i''ve been getting this same thing with both rspec 1.1.1 and now with 1.1.2.
ruby-debug works with i''m in the application code, but not when i''m in
the ''spec'', or spec helper methods i''m loading. Basically any command
which should normally work like p, or pp, gets passed through to a
method_missing.
I''m kind of stumped on this
2008 Nov 03
1
Questions about changes to Restful Authentication.
I have a couple of projects with Restful Authentication
The first snippet is from the Git repo today and is supposed to be the
newer code.
# Store the given user id in the session.
def current_user=(new_user)
session[:user_id] = new_user ? new_user.id : nil
@current_user = new_user || false
end
# Store the given user id in the session.
def current_user=(new_user)
2000 May 22
1
Inherit Permissions addition
Gentlemen,
I was delighted to read about and test the "inherit permissions" feature of
version 2.0.7 for myself. This is a wonderful addition to Samba; thank you,
David Lee, for your fine work.
After initial testing, it became apparent to me that inheriting the 'group'
permissions on a subfolder within a share without also 'forcing' the group
ownership on the new files