model-associations
Rails 3: how to do database call for HABTM relationship
I setup a HABTM relationship between my post model, genre model, and genres_posts model. My genre model has a name:string attribute which consists of names like开发者_如何学JAVA \'thriller\' \'western[详细]
2023-04-11 22:06 分类:问答Creating new blog with tags
Im trying to setup a blog with tagging, and i\'ve run into a problem when trying to save. I got 3 models[详细]
2023-04-08 06:02 分类:问答CakePHP/Croogo: A veeery complex association
When I was working on my current project, I ran into a rather comple开发者_JAVA百科x issue. I\'ll point out my problem much more detailed right now:[详细]
2023-04-06 12:08 分类:问答How can I check if one ActiveRecord class belongs to another
Given tw开发者_开发知识库o subclasses of ActiveRecord::Base, how can I implement a function that checks to see if one belongs to the other?[详细]
2023-04-05 20:07 分类:问答Ruby on rails application with multiple models
I have a few small ROR \"mostly static\" type sites and am working on something a little deeper that I don\'t have much experience with...[详细]
2023-03-31 20:53 分类:问答has_one :conditions being interpreted as attributes?
This association: class Business < ActiveRecord::Base has_one:map_address, :as=>:addressable, :class_name => \'Address\', :conditions => {\'addresses.map_address\'=>true}, :dependent =[详细]
2023-03-31 19:24 分类:问答Ruby on Rails: has_many referential --which model objects does it own?
I am new to Rails and finished Michael Hartl\'s \"Ruby on Rails 3 Tutorial\". Although the book teaches me a lot, I find this puzzle I don\'t understand.[详细]
2023-03-31 12:25 分类:问答Multiple entries in a :has_many through association
I need some help with a rails development that I\'m working on, using rails 3. This app was given to me a few months ago just after it\'s inception and I have since become rather fond of Ruby.[详细]
2023-03-29 22:44 分类:问答model has two attributes that belong to another model
I have a model as follows: Greeting belongs_to :icon belongs_to :icon, :foreign_key => :user_icon I need to save the icon_id and also the user_icon id in the case I don\'t have a registered us[详细]
2023-03-25 21:50 分类:问答How do I delete a record from all tables it is referred to?
Good morning fellow Overflowers, Small problem with model associations. I have these model associations:[详细]
2023-03-24 04:00 分类:问答