similar to: Explanation on Activerecord Associations

Displaying 20 results from an estimated 5000 matches similar to: "Explanation on Activerecord Associations"

2006 Jan 04
3
PDF Form Reader using rails/ruby
Can someone guide me the best possible way to read a PDF form fields. I have seen some references to the PDFWriter but not the reader. Any help appreciated. Thanks Silvy Mathews -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060104/641bd399/attachment.html
2006 Jan 18
6
Mention about an open source image editor
Some days back there was a mention about an open source image editor that people uses for application layout designing. I have forgotten about the name of that software. Can someone send me the link? Silvy Mathews
2006 Jan 08
4
Rails table pluralizing Issue
Hi, I am working on a table with name "addresses". However when I do a ruby script/generate scaffold Address, I am not able to access http://localhost:3000/addresses. I am getting the following error. uninitialized constant Addres This error occured while loading the following files: addres.rb How do I resolve this issue. Thanks Silvy MAthews
2006 Feb 02
4
Doubts on validation
Hi All, View ******** <tr> <td><b>Student: </b></td> <td><%= text_field "student", "fname", "size" => 40, "maxlength" => 40 %></td> </tr> <tr> <td><b>Program: </b></td> <td><select id="student_program_id"
2006 Apr 12
9
Showing Images from a file store
Hi all. I am wrting a small content management tool for my company and was trying to display some images from our file store shown below. <td> <img src="\\xx.xx.xxx.xx\xx\xx\xxx\abc.gif"/> The app was displaying the image when it is under the \public\images directory. Is there anything special we need to do to get a file from outside the root of the application? Any help
2006 Jan 28
2
Trying to understand the difference between similariterators
No I have tried that. It gives me just this output # -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Pat Maddox Sent: Friday, January 27, 2006 2:48 PM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Trying to understand the difference between similariterators Well first of all, when you''re iterating
2006 Jan 27
2
Trying to understand the difference between similar iterators
What''s the difference between these two? Objective: Trying to display the addresses of the students that has "has_many" relations with addresses <td><% @student.addresses.each {|address| "Address: #{address.addr1}<br/>"} %> </td> ****** did not work <% end %> This code worked: <td><% @student.addresses.each do |address|%>
2006 Jan 09
3
Design Question
I am sure some of you can give me an insight into this. This is more towards the database design for the scenario below: Say for example, I have a person table and this person can have different address types. One could be Home and the other could be say Office. Should be model this Table people id fname lname Table addresses id person_id addr1 addr2 .... or Table people id fname lname
2006 Jan 18
5
Inserting the parent Id to the child table
Hi All, I need your suggestions for the following. I am still learning RoR and pardon my ignorance. I have say two tables. Table A : students Table B : addresses Table B has student_id as the foreign key to Table A If I am displaying the list of students and wanted to get individual students addresses based on their id, is the only option is to get the id from students controller method list
2012 Oct 01
1
active_model_serializers, more than one level deep of associations, specifying serializers per association
I am assuming this an appropriate place to discuss this, but if it isn''t my apologies- just let me know. Just a Rails 4-ish thing. Am attempting to pull AMS (active_model_serializers), strong_parameters, and the "permitter" strategy that Adam Hawkins is using: http://broadcastingadam.com/2012/07/parameter_authorization_in_rails_apis/ Code so far is here (in the
2005 Dec 22
3
RoR presentations
Hi, I was wondering is there any editor that can do autocompletion as shown in the tutorials on the RoR website in the windows or linux environment. If not do any one has sharable macros that comes with textpad or any other editors. Silvy Mathews
2006 May 17
2
ActiveRecord::Associations ER diagram/macros
Hello, I found an interesting ER diagram on the "Module: ActiveRecord::Associations::ClassMethods" page of the Rails Framework Documentation : http://ar.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html At the beginning we can read ? Associations are a set of macro-like class methods for tying objects together through foreign keys. They express relationships like
2006 Mar 02
1
ActiveRecord in modules & associations
I''d like to organise my active records into modules but can''t get the associations to work. The doc says that associations within the same module should work. I''ve tried using the class_name option too but still doesn''t work. Can anyone help? For example module Mod1 class Animal < ActiveRecord::Base has_many :dogs, :class_name =>
2005 May 14
2
ActiveRecord::Associations::ClassMethods Documentation Issue
I''m curious, but isn''t this example in the documentation for ActiveRecord::Associations::ClassMethods somewhat counter-intuitive? The SQL DDL is correct for the way it''s used in the models. But isn''t it more logical that an author would have many posts, rather than many authors having one post? From
2013 Nov 30
1
Need good tutorial on ActiveRecord associations
Hi, I am very new to rails.. I am having hard times to understand the ActiveRecord associations.. I tried http://guides.rubyonrails.org/association_basics.html .. But it is not for beginners. :) Is there any good tutorials, to understand the concept? Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on
2010 Mar 10
0
Rails ActiveRecord associations autosave option
I have the following associations. class Document < ActiveRecord::Base has_many :document_sections, :dependent => :destroy, :autosave => true has_many :document_items, :through => :document_sections end class DocumentSection < ActiveRecord::Base belongs_to :document has_many :document_items, :dependent => :destroy, :autosave => true end class DocumentItem <
2006 Feb 02
0
proposed bugfix/patch: ActiveRecord cross-module associations
Hi, I''m still test driving the improved support for module namespaces in rails and I''ve hit a problem with associations between AR classes in modules and AR classes in the root namespace. The long and short of it is I want to be able to say: Foo::Bar.belongs_to :wibble, :class_name => "::Wibble" If you don''t try to prefix ''Wibble''
2005 Jul 28
0
ActiveRecord, computed values, and associations
Is there some sort of good pattern for dealing with computed values with Rails/ActiveRecord? A simple example: 3 tables, classes, students, and student_class_records (habtm style relation but contains a good deal of additional state so is modeled explicitly) Something like select the 10 classes with the most students. Easy enough in SQL. So I''m using a lot of find_by_sql and
2006 Nov 27
2
changing activerecord associations at runtime
Is there any way to change the associations of a model at runtime, like before running a specific query? Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this
2008 Feb 22
2
marshaling ActiveRecord objects: how to unload associations?
I''m marshaling ActiveRecord objects, and I want them to be as small as possible. How can I unload everything that can be reloaded from the database? If they''re marshaled before any of the associations are referenced then the referenced objects aren''t dumped. But if the association has been loaded, how can I unload it? AssociationProxy.reset doesn''t seem to do