Hi,
Here is an interesting and informative blog that might be very useful
for ROR professionals. Hope people can take advantage of this
information via your forum.
http://www.idyllic-software.com/blog/active-record-associations-tips-and-tricks/
Cheers!
--
You received this message because you
excellent blog.
On Mon, Apr 16, 2012 at 12:55 PM, Vanita Kothari
van...@idyllic-software.com wrote:
Hi,
Here is an interesting and informative blog that might be very useful
for ROR professionals. Hope people can take advantage of this
information via your forum.
I have the following associations in my models:
item.rb
belongs_to :manufacturer, :class_name = Company
belongs_to :distributor, :class_name = Company
company.rb
has_many :items
My question: what is the best way to find all of the items belonging to
a specific company?
If I call Company.items
On 4 October 2011 21:35, Jim Burgess li...@ruby-forum.com wrote:
I have the following associations in my models:
item.rb
belongs_to :manufacturer, :class_name = Company
belongs_to :distributor, :class_name = Company
company.rb
has_many :items
My question: what is the best way to find all
On 4 October 2011 21:40, Colin Law clan...@googlemail.com wrote:
On 4 October 2011 21:35, Jim Burgess li...@ruby-forum.com wrote:
I have the following associations in my models:
item.rb
belongs_to :manufacturer, :class_name = Company
belongs_to :distributor, :class_name = Company
Trying again.
On 4 October 2011 21:44, Colin Law clan...@googlemail.com wrote:
On 4 October 2011 21:40, Colin Law clan...@googlemail.com wrote:
On 4 October 2011 21:35, Jim Burgess li...@ruby-forum.com wrote:
I have the following associations in my models:
item.rb
belongs_to :manufacturer,
I have a model Chapter
I figured out how to add assets to chapter through papermill plugin.
Now the question:
how can i add additional description to each asset?
It can look like:
chapter has_many items
item belongs_to chapter
item has_one papermill_asset
papermill_asset belongs_to item
But i
Hi,
I'm running into a memory performance issue with Active Record
associations.
I'm tinkering with Redmine, a rails-based project management
application. The central model in the application is 'Project' which
associates via has_many to model Issue. One of the things you can do
with Projects
Hi if i have one model say with objects for each letter of the alphabet
e.g a,b,c ... x,y,z and i want to allow users to create there own
favourite pairings of these e.g.
ab, cd, ef, gp and allow them to discuss via comments on each pairing,
whats teh best way to model this in rails?
the order
I have tables:
users (id, name)
computers (id, name)
mobiltelefons (id, name)
OwnComputers (id, user_id, computer_id)
OwnMobiltelefons (id, user_id, mobiltelefon_id)
So is it has_many :through or has_and_belongs_to_many or what?
I only need to search one own table at time:
All computers that
What's wrong with ruby associations?
Somehow association fields don't have any support for dirty objects
nor optimistic locking.
I would expect dirty objects to work like this:
class Person
has_many :cars
end
person = Person.find_by_name(Jack)
person.cars
= [#Car id: 2, name: BMW,
I want to accomplish the following. I have an object that can be
edited. However, it can occur that two people might edit the object
at the same time. Instead of locking the object down, I prefer to
tell the user how their version differs from the last version that was
committed.
Kinda like:
12 matches
Mail list logo