similar to: Join different querys in the same object

Displaying 20 results from an estimated 10000 matches similar to: "Join different querys in the same object"

2006 Apr 21
1
Data access problem in object when using acts_as_authenticated
Hi all, I''m running into this frustrating issue with the acts_as_authenticated plugin and one of the additional fields I added to the users table. I have added a column ''account_type'' to the users table (among several others) which denotes the type of account it is. This stores an integer value that is set by the system during account creation. The value is getting set
2004 Mar 15
0
join domain without root
Dear Samba gurus, I am still using Samba 2.2.8a; I have not seen an announcement that this issue would be fixed in 3.0.2; all that follows refers to 2.2.8a. Quoting from Samba-PDC-HOWTO.html (or Samba-HOWTO-Collection.html): Joining the Client to the Domain Windows 2000 ... Windows prompts for an account and password that is privileged to join the domain. A Samba administrative
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
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/
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 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
2010 Oct 30
3
Authlogic not active
Trying to add authlogic in a simple project but get the error; Showing app/views/layouts/application.html.erb where line #33 raised: undefined method `underscore'' for nil:NilClass Extracted source (around line #33): 30: <div id="mainleft"> 31: <ul class="menu"> 32: <li><%= nav_link "Home", "site", "index"
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],
2007 May 17
4
How to mock helpers in view specs ?
Hi all, I am mocking the following Rails view (inside a partial): <%= render :partial => "forums/forum", :collection => forum_category.forums.readable_by(current_user? ? current_user : nil) %> My spec fails with the following message: 1) ActionView::TemplateError in ''forum_categories/index (anonymous user) should only render forums accessible to anonymous
2008 Jul 12
1
Re: Re stful_authentication, Internet Explorer, and unwanted http basic dialog
I''m glad I found your post Joshua - it saved me quite a bit of time! To get this to work for me however (IE6), I had to ditch the ||= and do straight assignment: request.format = :html if request.env[''HTTP_USER_AGENT''] =~ /msie/i Joshua Doss wrote: > > > Alter access_denied to add this line (right below "def access_denied"): > >
2008 May 06
1
check_friendship method only returning value of last pair
Hello, I''m new to facebooker and ruby, so not sure if the issue I am having is due to my misunderstanding or a bug in facebooker plugin. Here is what I have: def show @current_user ||= facebook_session.user @member ||= params[:id].to_s==@current_user.id.to_s ? @current_user : Facebooker::User.new(params[:id]) #for each of current_user''s friends, check if they are
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
2006 Oct 09
5
Problem setting variables in ApplicationController.
I''m dynamically generating menu options based on the currently logged in user: current_user. My menus are setup on the applicatin.rhtml file. The current_user is defined in the application controller. But, attempting to assign it a value while in the application controller results in an ''undefined method'' error. ApplicationController .... def current_user @cu =
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
2006 Aug 16
3
calculate method is gone once I use ''find''?
Could someone please explain why this works: current_user.accounts.sum(:balance) But not this: current_user.accounts.find_all_by_active(true).sum(:balance) For the latter Rails tells me sum is an undefined method. It seems like I lose the ActiveRecord methods when I call ''find''? This (simpler) does not work either: current_user.accounts.find_all.sum(:balance) Thanks! --