similar to: (Enhancement?) for self referential has_many :through, w/ scoped create...

Displaying 20 results from an estimated 300 matches similar to: "(Enhancement?) for self referential has_many :through, w/ scoped create..."

2006 Mar 25
0
Self-Referential Many-To-Many relationships where the relationship itself has data.
Trying to model a bunch of users that have friends that are other users. clearly a job for has_and_belongs_to_many, but the trick is, they have ratings for their friends. I have gone through the Rails Recipes book, and it seems like I''m trying to combine the self-referential many-to-many recipe (12) and the many to many relationships where the relationship itself has data recipe (16). So
2006 May 28
7
Self-referential has_many :through relationship
Hi, I have a self-referential has_many :through relationship setup to track relationships between users. Basically relationships are modeled as a join table with an extra column ''relation''. create table relationships ( user_id integer unsigned not null, friend_id integer unsigned not null, relation char(1) not null, ) --- relations --- f = friend r = request to
2010 Feb 16
0
Strange routing(?) Issue
I have a Model event and the following two lines in routes.rb 1 - map.connect "events/:action", :controller => ''events'', :action => / [a-z_]+/i 2 - map.resources :events, :has_many => :comments, :has_one => :address #, :collection => {:mapit => :get} I have #1 so that I can call custom actions from a link_to_remote link from my index page t0 update a
2001 Feb 05
0
sshd can't access user files
Hi We have detected a problem in sshd when trying to access user files in order to authenticate a user via public key. In our system, each unix group has a separate home directory with 0750 permissions owned by root.group, therefore a user can access his home directory thanks to his group ownership. After installing OpenSSH 2.3.0p1 on this system we noticed that public key
2008 Nov 20
3
Any progress on undirected self-referential many to many relationships?
I am going to re-ask a question that has been asked a few times in the past. What is the best way to represent an undirected self-referential many to many relationship. Trivial examples of this include an edge in an undirected graph, or a mutual friendship. Alice is a person Bob is a person Alice and Bob are friends of each other We have a whole bunch of extra information about their friendship
2006 Mar 31
6
Adding objects to a :through association
So I''m one of those nasty people building a self-referential habtm-like Association using the funky new :through stuff. This is about users having friends, so here''s my user.rb: class User < ActiveRecord::Base has_many :friendships, :foreign_key => ''user_id'' has_many :friends, :through => :friendships, :source => :friend end And here''s
2006 Aug 15
2
How to access attribute in a self-referential many-to-many relationship
Hello List, I created a self-referential many-to-many relationship (as described in the book Rails recipe #18), where I have a model that has many-to-many relationships with itself. In this case, it''s person who can become friends. The join table looks like this: mysql> select * from friends_people; +-----------+-----------+-----------+ | person_id | friend_id | confirmed |
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
2009 Jun 14
6
Unable to make observe_field work
I can''t make it work. <%= text_field_tag :friend %> <%= observe_field :friend, :url => friendships_url, :on => :click %> <%= javascript_include_tag :defaults %> Raises the error:Can''t find variable Form. The generated html is: <input id="friend" name="friend" type="text" /> <script
2015 Feb 16
0
Only stereo sound with gtx570 over hdmi (regression)
On Mon, Feb 16, 2015 at 5:03 AM, Farid BENAMROUCHE <fariouche at yahoo.fr> wrote: > Hello all, > > I'm using gentoo, with kernel 3.17.0-p1-pf and at some point, a patch was included in this branch of the gentoo kernel that broke hdmi audio. > > I've checked with the latest 3.19 vanilla kernel, and I still have the same problem. I cannot output multichannel sound over
2015 Feb 17
1
Only stereo sound with gtx570 over hdmi (regression)
Hello Ben, The working kernel code I based my investigation was a 1.3.17 + gentoo patch (so yes, pretty old) The new one below, not working is the vanilla 3.19 (from the gentoo repo, should be identical to the latest 3.19 stable) I've narrowed down the issue to the size of the eld. The new patch (that indeed uses drm_eld_size) (with this patch, I have a working 3.19 kernel): I will need to
2011 Aug 03
1
Need help with xyplot
Consider I have the following data: AgeRange AgeOfPerson PersonNo FriendsAtYear0 FriendsAtYear1 FriendsAtYear2 FriendsAtYear3 FriendsAtYear4 FriendsAtYear5 10 - 12 11 1 0 1 2 2 3 3 10 - 12 12 2 0 1 2 2 3 3 15 - 18 13 3 1 2 3 4 6 7 15 - 18 14 4 1 3 4 5 7 7 30 - 40 33 5 3 5 5 6 8 9 30 - 40 36 6 4 4 4 4 4 4 I want to plot the number of friends against number of years, as to show how friendships
2009 Aug 15
4
Isn't there any performance issue when saving serialized attributes every time?
In edge rails, serialized attributes are saved every time no matter they are changed or not: def update_with_dirty if partial_updates? # Serialized attributes should always be written in case they''ve been # changed in place. update_without_dirty(changed | (attributes.keys & self.class.serialized_attributes.keys)) else
2003 Jan 03
0
can see the netw. but not connect...
I've recently managed to install linux which I'm pretty happy about :) I've tried to set up my home network, now this is what's giving me the head ache... I can get my computers to ping eachother, no problems, my XP and w2k computers can see the linux box in the network neighbourhod they can access the sort of first layer of the linux box but no further. I cannot access
2004 Sep 10
1
mpd has support for flac!
Hello, http://musicpd.sf.net just came out today, with (amongst many other things) support for flac. MPD is a very stable, lean Music Playing Daemon written in C, that can be interfaced several different ways, through php, plain old telnet, there is a CLI on the way, and a GTK2 client on the way also. Please give it a try and tell us what you think @ irc.oftc.net #mpd. Thanks starz
2004 Sep 10
0
[Flac-users] mpd has support for flac!
Hello, http://musicpd.sf.net just came out today, with (amongst many other things) support for flac. MPD is a very stable, lean Music Playing Daemon written in C, that can be interfaced several different ways, through php, plain old telnet, there is a CLI on the way, and a GTK2 client on the way also. Please give it a try and tell us what you think @ irc.oftc.net #mpd. Thanks starz
2009 Feb 17
0
Invitation to attend SETIT2009
Invitation Dear We would like to invite you to join us for the 5th International Conference named Sciences of Electronics, Technologies of Information and Telecommunications SETIT 2009 which will be held in Hammamet-Tunisia from 22 to 26 March 2009. As you know, this International Conference is under the supervision of Professor Lazhar BOUOUNI, the Tunisian Minister of Higher Education and
2012 Aug 17
4
Appending many different and separate Excel files using R
Dear all, Good day! I have a problem in reading Excel files in R and appending them to each other. Suppose we have several Excel files in a directory with headers and want to use R to append them in a single file with an additional variable in the final file indicating from which files the data come from. As I have many Excel files and their sizes are very big I should write a loop in R to do
2006 Jul 20
1
self referential xml using builder
Hi listers, I''m trying to build an xml doc using Builder, but I''m having trouble getting it to draw a tree structure from a self-referential table. Here''s what I''m after: ========================== ---- object structure ---- node (name => root) - node (name => child 1) - node (name => child 2) - node (name => child 2.1) - node
2006 May 02
0
Self-referential MtoM implementation
ok, guys i have followed the self referential recipe from the book it works perfect but now i have some doubts, at the end the model are modified to force the user beign added as a friend that add too who are adding him so how i can make that the full relationship doesn?t be complete until the friend beign added approves it(talking in the implementation of the code of course)? by the way,