similar to: Need help on Many to Many Relationships

Displaying 20 results from an estimated 6000 matches similar to: "Need help on Many to Many Relationships"

2010 Jun 05
6
How do you update HABTM relationships or create.
Hi, I have a User model with a HABTM relation to a Role model and vice versa. So There''s a roles_users table that references :user and :role. I''m using formtastic, and in the user.edit.html.erb I have a line that outputs the roles as a multi-select list box. But the box is not showing the roles that have been assigned to the users. Another problem is that if I select a few
2010 Mar 11
1
Emails Disappearing -- Mystery
I got a case that I haven't been able to resolve. I hope somebody can give me some hints. One of our users is reporting emails disappearing in front of his eyes, (Right ... emails filters at the client side ....) Server does not have global sieve filter enabled (no file present), even though this configuration is present: sieve_global_path=/vmail/globalsieverc User does not have
2009 Jun 27
6
User has many topics or subtopics
Hi, So i have users in the system and i have topics. Topics also have_many subtopics. What is the cleanest way to setup the AR relationships if a user can either have_many topics or subtopics ? Its basically a dual select box dropdown, where the second dropdown is optional. Is the best to have user_topics, and user_subtopics tables and manage that way ? or combine into one table with STI
2006 Aug 16
15
OT: finding a designer (bit of a rant)
I''ve written my app already. It outputs valid xhtml and I need a stylesheet to drop over the top. How hard is it for people to understand that? It''s a small project, they''d have to do the main design/layout, and then a little custom styling for some specific elements which don''t appear on every page. That''s the point of CSS right? write once, use
2008 May 13
4
calling another rjs file in an if condition
Hi I have a controller action like below.This def is called by a submit_to_remote def edit_service_desk_status_after_transfer if params[:transfer_reason].empty? #This is used in the :failure of submit_to_remote else @sd_ticket = ServiceDeskTicket.find(params[:sd_id]) ActiveRecord::Base.transaction do @sd_status_history = ServiceDeskStatusHistory.new
2009 Aug 06
13
Redirect after login
Hi, I''m new to Ruby/RoR so please bare with me! I''m trying to adapt a ruby setup where someone logs in to a bonjour service via a web browser. I have the login screen which asks for host and password. There is only one user per host and i can log in fine. It''s suppose to redirect me to /list in my browser but doesn''t. Once i''ve entered the correct
2009 Nov 12
9
uninitialized constant XML::Document
Hi All, I have installed "libxml-ruby" gem on my ruby instllation. while trying to create xml document with ruby progam in Rad Rails am getting error like "uninitialized constant XML::Document (NameError)" do i need to config any thing else in environment.rb file Thanks in advance Chinna. -- Posted via http://www.ruby-forum.com/.
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
2009 Aug 06
6
initializers
I created a "config/initializers/tasks.rb" In it I have the following is all: logger.info("Running tasks") However nothing is logged or run. Am I missing something? -- Posted via http://www.ruby-forum.com/.
2014 May 22
3
Host OS, Storage Info
Hi, Is there any way to get host OS information and host Storage in formations using libvirt API...? Rgds -Sijo
2008 Oct 27
8
pagination in ajax
hi, I am curently using rails version 2.1.1. Currently i have done simple pagination using will_paginate plugin.it works.but when i am trying pagination using ajax with help of will_paginate plugin it wont works.i am also using RemoteLinkRenderer helper, but it gives an error uninitialized constant RemoteLinkRenderer. can anyone provide any tutorial or sample code so that i can
2011 Nov 24
4
How do I destroy all the posts when the board is destroyed?
I got a application like following. A board has many posts All posts belong to a board I try to destroy all the posts under a board when I destroy the board. My destroy function is following. def destroy @board = Board.find(params[:id]) @post = @board.posts @post.destroy @board.destroy respond_to do |format| format.html { redirect_to(boards_url) } format.xml
2013 May 22
3
rails 4, active record: appending to has_many :through does not create join model anymore?
hi folks. on rails 4, can somebody confirm that pushing model instances onto a has_many :through relation does not create the necessary join model anymore? class Reader < AR::Base belongs_to :post belongs_to :person end class Post < AR::Base has_many :readers has_many :people, through: :readers end @post.people << Person.new so,
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
2009 Jun 02
3
valdate_presnce_of email, :if => :validate_id + Factory girl
Hi In the model I have User attr_accessor :validate_email_id validates_presence_of :email ,:if => :validate_email_id Could anybody please tell me how can I define a Factory for the above? Thanks in advance Sijo -- Posted via http://www.ruby-forum.com/.
2007 Oct 19
1
ActiveScaffold many to many relationships
Hi there, when I create active scaffolding in a many to many relationship, I would like that my create/delete actions in the nested scaffold would actually erase one relationship between the two tables or create a new link between the two tables, and not delete the record itself in one table or create a new record of one of the two tables involved. Is this possible with Active Scaffold? Thank
2009 Oct 29
4
manipulating form
Hi, I work with forms and i won''t to set a name for a form to use javascript functions.. How can i do Thanks
2014 Jun 06
2
Libvirt Python Bindings - Remote Connection using openAuth.
Hi, I am using libvirt with python binding, and I want to connect to a remote host. I was able to connect after making ssh certificate, but It is not applicable for my project. So I want to use openAuth() method, but I could not succeed connecting to a remote host using it. Here is my code ------------------------ import libvirt USER = "root" PASS = "mypasswd" def
2014 Jun 06
1
Re: Libvirt Python Bindings - Remote Connection using openAuth.
Martin, What do you mean by libvirt credentials...? -Sijo On Fri, Jun 6, 2014 at 1:57 PM, Martin Kletzander <mkletzan@redhat.com> wrote: > On Fri, Jun 06, 2014 at 01:06:55PM +0530, Sijo Jose wrote: > >> Hi, >> I am using libvirt with python binding, and I want to connect to a remote >> host. >> I was able to connect after making ssh certificate, but It
2008 May 20
3
gem and pluggin
Hi This is a general question.What is the differnece between these ?Why I am asking such a question is i am using will_paginate pluggin..Now it is available as gem..So is there any performance (stability and speed of execution) difference? Thanks in advance Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because