Displaying 2 results from an estimated 2 matches for "dayschedul".
Did you mean:
dayschedule
2008 Dec 09
7
subclassing vs mixins, which one should be used?
Hey all,
I have two models in my rails project that share a lot of traits. They
each have the same 4 properties, and now I need to add 2-3 methods to
each one that will be the same. In the spirit of DRY I am looking for
a solution to write these methods only once.
Both of these models already inherit from ActiveRecord . . . and I
didn''t know if it was safe to just "whip up" a
2008 Dec 08
3
Database calls in my views?
...d have been working on some re-writes that are showing a
tremendous amount of progress(This is my first major app!)
My initial page crunches and loads data from 5 separate tables. There
is a lot of logic that goes into supporting the Model the entire app
is designed around (appropriately named the DaySchedule object).
Within the views there are a lot of calls made from database
associations(DaySchedule.employee.full_name,
DaySchedule.assignment.assignment_name, you get the idea). These
related models are vital for the views, but I know that they are
killing my render time . . . I also know that db acc...