rails-activerecord
Best way to arrange object and models with different sets of important attributes
Suppose I have some medical software that tracks billing and medical procedures for patients.Each patient then has three important groups of attributes.[详细]
2023-04-12 01:57 分类:问答Rails 3: database calls for has_many :through relationship
I have an array of posts called @posts. Post model has_many :feelings :through => :feelingships. How do I take the array of posts and narrow them it down to only the posts with a specific feeling?[详细]
2023-04-11 16:20 分类:问答How to design model with two, independent and optional relations to the same model?
I\'ve got a problem with designing my User model and making a decent form for it. I just want to ensure myself that I\'m doing it wrong :)[详细]
2023-04-09 12:59 分类:问答Rails 3.1.0 server crashes when trying to delete Association model
I have the following models: association.rb: class Association < ActiveRecord::Base has_and_belongs_to_many :users[详细]
2023-04-09 05:34 分类:问答Rails grandchildren objects with :has_many, :through
I have a schema structured as follows: class Foo < ActiveRecord::Base has_many :foo_bars has_many :foo_bar_bazs, :through => :foo_bars[详细]
2023-04-04 19:49 分类:问答ActiveRecord Query Chains
This ruby/rails construct always puzzles me: User.where(:name => \"Thiago\").limit(3).using(:slave_one)[详细]
2023-04-01 09:08 分类:问答Rails Controller Models Naming Convention Problem
I am a newbie to Ruby on Rails and trying to setup oracle based ROR application, The DB table name is booker.live_edi_vendors[详细]
2023-03-31 05:07 分类:问答Ruby on Rails 3 - create an instance of one model from another model
I have the following problem, but first I will make some assumptions The example is just to explain my problem in an easy way[详细]
2023-03-28 21:40 分类:问答Rails: Model instance method or helper method?
By convention, should the following be defined as an instance method of my model or a helper method? # app/models/user开发者_开发问答.rb[详细]
2023-03-20 21:30 分类:问答Does rename_column take care of indexes?
Say, we have something like this: add_column :users, :single, :boolean add_index :users, :single and then later we do[详细]
2023-03-20 20:50 分类:问答