similar to: newbie trouble with find method and dual many-to-many relationship

Displaying 20 results from an estimated 6000 matches similar to: "newbie trouble with find method and dual many-to-many relationship"

2006 Feb 16
4
newbie question regarding basic AJAX form verification
Hi, I''m confused about how form verification with AJAX works. Let''s say I have a ''new.rhtml'' view that contains a form with two fields, and the form action is ''create''. Let''s assume that I also want to do some type of data validation on one of the two fields via AJAX before I submit the form. But since I''ve already
2006 Apr 27
5
one more try - ENV and FastCGI
Hi, I''m desperate, so I thought I''d try one more time in the hopes of getting a different audience. Basically. it boils down to this. Using CGI, the ENV hash is populated and is accessible from a model script. Using FastCGI, the ENV hash is empty. Can anyone explain how I can fix this? Thanks, Stan Mcfarland -- View this message in context:
2009 May 05
1
will_paginate problem
Hi all, I''m having a bit of a problem with displaying a blog list using the will_paginate helper. My code is: entries_controller: def index @entries = Entry.find(:all) @blog_entries = @entries.paginate( :page => params[:page], :per_page => 4, :include => :user, :order =>
2006 Feb 10
0
Update two models that have belongs_to relationship
I have model Program and model PointOfContact. Program belongs to PointOfContact. There is a form to update values, which shows attributes from both models on one form. What is the best way to update the models with one call. I tried this and it did not work Controller code: @program_old = Program.find(params[:id]) @program = Program.new(params[:program]) @program.id =
2007 Jul 11
2
dovecot-dspam plugin & virtual users
Hi list, hi Johannes, I'm trying to use the dovecot-dspam plugin ( http://johannes.sipsolutions.net/Projects/dovecot-dspam-integration ) with vpopmail's virtual users. All seems well, except for the fact that dspam should be called with '--user currentuser at currentdomain.com' at line 157 here: http://johannes.sipsolutions.net/Projects/dovecot-dspam-integration/beta7-code For my
2000 Feb 18
1
Netscape Profiles
There was a posting on Netscape Profiles mapped to network drives that I was hoping someone could help me with. Other than setting the key for password encryption, I've never messed with the NT registry keys. I see this folder: \Registry\Machine\SOFTWARE\Netscape\Netscape Navigator\Users = But making this part, I could use some help: CurrentUser = Default
2009 Feb 22
8
dynamically changing a form from POST/CREATE to PUT/UPDATE
For the life of me I can''t figure this one out, although I can''t find anyone else who''s attempted to do this, and probably with good reason. Context: blog using AJAX What I''m trying to do: when the user initially saves a blog entry, or when auto-saving, I want subsequent saves to not create a new blog entry Why I can''t just reload the partial: -
2006 Mar 16
1
beginner question on active record relationships
say I have the following: # user table # - id # - username # - password class User < ActiveRecord::Base has_many :items end # item table # - id # - user_id # - name class Item < ActiveRecord::Base belongs_to :user end What is the correct way for creating a new item instance with relationships in place (assuming the current user is available in the current_user instance)? Do you
2006 Apr 25
1
problem with environmental variables and FastCGI
Hi, I''m trying to deploy my app using FastCGI, and I have a problem. The application works correctly in either FastCGI or CGI mode (toggling between dispatch.fcgi and dispatch.cgi in my public/.htaccess file) except that under regular CGI, my ENV hash is correctly set, but under FastCGI, the ENV hash is completely empty. I thought that environment variables were automatically passed
2009 Oct 23
1
Connecting to winbugs from R
Hi, I'm having trouble running a script within winbugs when calling winbugs from R. Here are a few lines from the winbugs log: display(log) check(C:\DOCUME~1\michael\LOCALS~1\Temp\RtmpjKnHMu\mm_TO_bugs9bc21e.txt) cannot open C:\DOCUME~1\michael\LOCALS~1\Temp\RtmpjKnHMu\mm_TO_bugs9bc21e.txt data(C:/DOCUME~1/michael/LOCALS~1/Temp/RtmpjKnHMu/data.txt) command #Bugs:data cannot be executed (is
2007 May 10
5
Pagination has many through problems
I have searched for days for an example that demonstrates what i would like to do, and this morning i thought i''d worked it out, but no....here''s what i have: Controller ========== class ProfilesController < ApplicationController def friends current_user.profile.friends end def list_friends @profile_pages, @profiles = paginate( friends, :per_page => 10) end end
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