Displaying 20 results from an estimated 100 matches similar to: "Relationship Proxies?"
2006 Jul 26
3
Polymorphic Association with Single Table Inheritance?
Hello,
is it possible to setup a model/table schema like this:
Groupable --> Membership <-- Group
^ ^
| |
User UserGroup
I tried the following but failed:
Groupable (table with ''type'' column)
has_many :memberships, :as => :groupable
has_many :groups, :through => :memberships
2003 Oct 02
0
3.0.0-2 on RH9 as domain member of win2k domain - not able to write to shares...
Hi,
I'm unable to write to shares on the RH9 box from win2k clients.
Have successfully joined domain with 'net join ads'
getent passwd lists local unix users and win2k domain users successfully
I've mapped a DOMAIN+user_group to unix user_group, which 'net groupmap list' shows successfully
I have tried various ways to give DOMAIN+user.name access to the share, by changing
2020 Jun 13
0
It seems to have bug for @group to set in valid or invalid conf
No one care then i closed it. Thanks.
On Fri, Jun 5, 2020 at 5:18 PM Jeremy <jeremy55662004 at gmail.com> wrote:
> Hi all,
>
> I am using samba 4.10.7 and it seems to have bug for using @group in valid
> or invalid conf (?). And i can't find fixed patch in later release. I
> describe this issue detail below:
>
> 1. Firstly, there is my samba conf below (Add
2020 Jun 05
3
It seems to have bug for @group to set in valid or invalid conf
Hi all,
I am using samba 4.10.7 and it seems to have bug for using @group in valid
or invalid conf (?). And i can't find fixed patch in later release. I
describe this issue detail below:
1. Firstly, there is my samba conf below (Add @d_group in "invalid users"):
(smb_share.conf)
[f1]
path = /home/f1
write list = "admin" "@Administrator_Group"
2008 Jun 06
2
joining tables
Hi
I have 3 tables as
1) user_groups
id | contact_id | group_id | group_user_type_id
2) contact
id | name_first | name_last |
3)contact_email_addresses
contact_id | contact_email_address_type_id | emailaddress
Now I have group_id sa for example 68
What I want is from contact_email_addresses table get all the
emailaddress with contact_email_address_type_id=2 for the contacts
2007 Dec 28
1
validation of acts_as_list in the model of the base class?
Lets say I have 3 models, user, user_group and user_group_nodes. A
normal user has one user_group_id as a foreign key and a special user
has multiple user_groups which are defined in the user_group_nodes.
The user_group_nodes is a "acts_as_list" for user and contains a list
of group_ids.
When I build a form to get user input and I want to save it, is there
a way to validate the
2009 Nov 06
0
Nested objects not propagating from view
I thought I had this fixed, but apparently not. It works okay from the
console, but not from the view. I have the following:
# partial schema
create_table "users", :force => true do |t|
t.string "login", :null => false
t.string "first_name"
t.string "last_name"
t.string "email", :null => false
2006 Jan 19
0
Help with nested HABTM relationship
Hi,
I am trying to perform a query with ActiveRecord that I want to put into
a Rails application later. For now I just wrote it within a plain old
Ruby script for easier testing.
I am working with an existing database so I had to map some foreign keys
myself. As you can see from the models below, the database has a
structure of
Prospectlists <=habtm=> Contacts <=habtm=> Accounts
2006 Apr 17
3
model.models.models or model.models.find(:first).models
I the following three models which all have has_and_belongs_to_many
# User <-> UserGroup <-> Permissions
class UserGroup < ActiveRecord::Base
has_and_belongs_to_many :users, :join_table => "user_usergroup_join"
has_and_belongs_to_many :permissions, :join_table =>
"usergroup_permission_join", :uniq => true
end
I can do this:
permissions =
2006 Mar 28
2
Fastest way of adding " " around multiline text in RADRAILS
lets say i have the following SQL in my database editor :
When i paste it into rad rails i have to add quotes and the ''+'' symbol
to the end of each line. It is very tedious. What is the best method?
select timesheets.employee,
sum(items.hours) as hours,
sum(items.hours*timesheets.cost)
as cost,
sum(items.hours*timesheets.charge*decode(activities.chargetype,0,1,0))
as charge,
2010 Jun 11
0
nested form & habtm
so i am trying to save to a join table in a habtm relationship, but i am
having problems.
from my view, i pass in a group id with:
= link_to "Create New User", new_user_url(:group => 1)
User model (user.rb)
class User < ActiveRecord::Base
has_and_belongs_to_many :user_groups
accepts_nested_attributes_for :user_groups
end
UserGroups model (user_groups.rb)
class UserGroup <
2006 Aug 02
2
Self-Referential has_many :through
Hello all.
I am trying to create a self-referential has_many :through. I used the
following site as a guide
http://blog.hasmanythrough.com/articles/2006/04/21/self-referential-through
but it still doesn''t appear to be working. I have two models. Person and
Relationship. A person has many contacts (Which is another person)
through relationships
class Person < ActiveRecord::Base
2006 Aug 15
4
observe_form not serializing form
I want to use observe_form to automatically save notes in a text_area.
This is the code I have:
<form id=''notes_form''>
<%= text_area :contact, :notes, :cols => 40, :rows => 10,
:id =>''notes_text_area'' %>
<%= observe_form(''notes_form'',
:frequency => 1,
2002 Jan 04
2
Fax from Widows
Hey Guys
We've been using the respond program with SMB fax services and it's worked pretty good.
But I have one need which is not addressed by this software, which I'm hoping maybe
I can pay someone to hack into the windows code.
I need Respond to send a cover letter prior to being sent out, independent of the program queueing
the print job in windows. I was thinking I might be
2006 Nov 04
0
deleting associations
I have two class, client and contacts
A client has many contacts
class Client < ActiveRecord::Base
has_many :contacts
end
class Contact < ActiveRecord::Base
belongs_to :client
end
--------------------------------------------
I have the next data
Table clients
id name
1 John
Table contacts
id email
1 john@yahoo.com.ar
2 john@gmail.com
3
2006 May 06
3
Question about one-to-many-to-many
Guys,
I''ve set up a 1-M-M relationship between 3 tables/models. I can''t get
cascading deletes (haven''t tried updates yet) to work when the master
record is deleted. I''m using MySQL 4.1.x, and the error message is:
Mysql::Error: #23000Cannot delete or update a parent row: a foreign key
constraint fails: DELETE FROM contact_addresses WHERE (contact_id = 1).
2006 Jan 18
1
alias for *table*_id
I have a table contacts, in another controller I refer to a particular
contact_id as transfer_attorney_id or electrical_inspector_id - how do I
create the necessary alias in the Contacts model?
2005 Nov 20
1
mySQL 5.0 upgrade - incompatible DateTime format?
I''ve upgraded to mySQL 5.0, and it''s gone pretty smoothly except that on
DateTime.now doesn''t seem to return a value that mySQL likes any more,
as seen in the following exception:
Incorrect datetime value: ''2005-11-20T15:33:12-0800'' for column ''logged_at'' at row 1: UPDATE notes SET `due_on` = ''2005-11-20'',
2006 Mar 15
1
Through method problems with custom foreign_keys
A person has a many company_branches and
A company_branch has many people.
This join is represented using a "contacts" table.
I am using a legacy schema so i am forced into using non-standard rails
primary keys. I am using the new through relationship in rails 1.1.
p=Person.find(1)
b=p.company_branches # gives this error:
ActiveRecord::StatementInvalid: OCIError: ORA-00904:
2006 Aug 13
10
does rails enforce referential integrity???
Hi,
Is rails supposed to support referential integrity? That is rails
either support to be able to ensure that when a new contact is created
this can only happen if a valid suberb is associated with it, and which
mechanisms of the below are supposed to do this?
(a) using DB foreign key constraints information as a basis?
(b) using the "has_one" line in the model file to enfore?
If