similar to: has_many association.

Displaying 20 results from an estimated 10000 matches similar to: "has_many association."

2006 May 10
2
Rails, Postgres and the Date Field.
Hi guys, I''m having problems with my app. First of all, I created a date_select with the code: <%= date_select(''contact'', ''birthday'', :order => [''day'',''month'',''year'']) %> In the contacts table, I create a date field: birthday DATE When I save the values goes wrong into the database.
2006 May 05
5
Sessid.
How can I get the sessid from the current session object? For instance, I log in the system, and want to know which sessid I''m using. I''m storing the session using active_record. Later on, I want to restore a session finding it using the sessid. Thanks in advance. Fernando Lujan
2006 May 17
3
Slackware 10.2
Hi guys, I'm trying to use asterisk with my slackware 10.2 box. Kernel 2.6.13 from the testing... The udevd are not creating the /dev/zap devices. Someone already have success installing asterisk over slackware? Thanks in advance. Fernando Lujan
2006 May 18
1
R2/MFC Configuration.
I'm trying to put asterisk working with a proprietary pbx system. I'm doing it using a T1 crossover cable. The pbx system uses the R2/MFC specification. And the don't inform if it uses cas, ccs, ami or hbd3. My digium card is flashing a red light. How can I put this working with the R2/MFC system? Thanks. Fernando Lujan
2006 May 24
2
TE406P - MFC/R2
Guys, I'm trying to configure a TE406P with MFC/R2. here goes my zaptel.conf: span=1,0,0,ccs,hdb3,crc4 cas=1-15:1101 dchan=16 cas=17-31:1101 span=2,0,0,ccs,hdb3,crc4 cas=32-46:1101 dchan=47 cas=48-62:1101 The first strange behavior is that the: zap show status shows this: Description Alarms IRQ bpviol CRC4 T4XXP (PCI) Card 0 Span 1
2006 Mar 29
5
Asterisk Between PBX and FXS
Hi guys, I''m setting up asterisk to run with another pbx server. This pbx server support a feature that allows 2 extensions connect to the same FXS. No I put asterisk in the middle. Asterisk receives the call and dial to a SIP/peer. How the pbx installed support 2 extensions to one fxs... How can I figure out in asterisk which extension was dialed before the call came to asterisk?
2006 Apr 04
2
Ajax Effects Tutorial
Hi there, I am in love with rails... And now I want to rule Ajax effects with rails. Where could I find a book like: Ajax on Rails? :) Tutorials will be welcome too. Thanks in advance. Fernando Lujan
2007 Oct 30
2
WebDav Support.
Hi guys, I read that mongrel supports the webdav protocol. I need to "create" the webdav files and allow a third party app access it just for read purposes. What do you recommend? -- Fernando Lujan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071030/1527bd35/attachment.html
2006 Jun 08
1
Observable notifying a controller.
I want to code the following task: I have a class, for instance, class A with is a observable. I want to add a controller of my rails system to this class. So I can notify_observer, and it updates all controllers of my system. How do I pass a controller as a parameter to the add_observer() method? And where I put this code? Thanks in advance. Fernando Lujan
2006 May 09
1
Reusing a model to form and link_to.
Hy guys, Inside my app I have a form which contains user information. Sometimes a have a form with a text_field as above: <%= form_remote_tag(:html => { :action => url_for(:controller => "my_controller", :action => "my_action") }) %> <%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2006 Feb 26
4
Creating objects with has_many :through relationship
Three tables: users: id clients: id admin_contacts: user_id, client_id class Client has_many :admin_contacts has_many :contacts, :through => :admin_contacts, :foreign_key => :user_id, :class_name => ''User'' end I added the :contacts for ease of use of grabbing the user objects associated with the admin_contact. This all works great, I can grab the Users that
2006 May 03
1
Differences betwen check_box_tag and check_box form helper.
What is the difference between the check_box_tag and the check_box form helper? I can''t understand why both must exist. :( Thanks. Fernando Lujan
2006 May 04
4
What do you use RJS for?
I''ve read an intro or two for RJS, but I don''t fully get what it may be used for - AJAX? Please post what you currently use RJS for. Thanks! Joe -- Posted via http://www.ruby-forum.com/.
2006 Jul 30
3
Accessing @org.id yields internal number, not record id
With apologies, I can''t figure out the simplest thing: How to reference a record id instead of the internal memory location of that value. I''m new to Ruby but otherwise a veteran VB6/SQL programmer. My code: <snip> sSQL = "SELECT id, org_name FROM organizations WHERE user_id = ''#{sUserId}'' AND user_password =
2006 Jun 15
6
Newbie''s problem with a nil object he didn''t expect!
Dear Rubyists/Rails gurus, Though I''ve successfully completed the various Rails tutorials online and the Depot application from the Agile Web Development with Rails book, I''m still pretty much a Ruby/Rails newbie. I''m trying to learn by writing my own simple blogging application, but I''ve run into a problem that has had me scratching my head for a few days now.
2006 Jul 10
18
Deleting join association of has_many :through
I''m trying to use has_many :through, since my join model deserves being more than just an intersection table. But when I try to break the association, the break only seems "temporary": Let''s say my two tables are Users and Colors, and the join model is Favorites. user = Users.find(1) user.colors.length >> 2 c = user.colors.first >> #<Color:....>
2010 Jun 15
3
RoutingError
hi, can anyone help me. i want to create an url to invoke create action of a controller. routes.rb has the routes. But i am getting error at line 23. i have @user variable. user_contact_path(@user.id) I want generate url as : users/3/contacts to invoke contacts controller''s create action ---------------------------------------------------------------------------------
2008 Apr 18
3
has_many and belongs_to with non-primary foreign keys
Hi, I''m having a bit of trouble with my first Rails app. ---- I have two tables: create_table :items do |t| t.column :created_at, :timestamp t.column :user_id, :int t.column :text, :text end create_table :users do |t| t.column :user_id, :int t.column :name, :string end ---- I''m trying to use the "user_id" field to link both tables, with each user
2011 Jan 15
3
has_many :through with Single Table inheritance
I have the following model structure setup. class User < ActiveRecord::Base end class Parent < User has_many :relationships has_many :children, :class_name => "Student", :through => :relationships, :conditions => "related_as = ''parent''" end class Student < User has_many :relationships
2006 Jan 06
1
has_many with :finder_sql question
hi all, I have a Class, Client, which has_many projects (Project class). the projects depend on a session_id variable, however. So the question is, how can I do the following: has_many :projects, :finder_sql => "SELECT p.* FROM projects p INNER JOIN projects_users pu ON pu.project_id = p.id WHERE pu.user_id = #{session[:user_id]}" The problem is that I need to filter a