similar to: STI and Active Record

Displaying 20 results from an estimated 10000 matches similar to: "STI and Active Record"

2011 Apr 15
2
sti + namespace
I''m spidering historical weather data from various sources. I have a WeatherStation class that is begging for an STI implementation: a WeatherStation is associated with a specific weather service, and each weather service has its own protocol for fetching weather data, but most of the code is can be shared in the WeatherStation parent class. Ergo STI. But there are a lot of weather
2007 Oct 27
0
STI vs Polymorphic Associations
I have a MasterEvent model. It has attributes that is required by another model Event. The user selects the MasterEvent model and I create the Event model by merging the attributes of the selected MasterEvent with the attributes that were presented for the Event model in the form. I have association declarations in the MasterEvent and Event models. If I use STI does the subclasses inherit the
2006 Mar 01
4
STI, subclasses and callbacks
I have a STI class tree. I want to set some default values (calculated values so I can''t set it in the database as defaults) on every created instance regardless of what subclass is actually instantiated. So I figured adding a after_create callback in the top class in the hierarchy should do the trick. It seems it doesn''t get called :( Code: class SuperClass <
2006 Jun 17
5
STI versus Composition...or the headaches of one big table
Guys, I have a relationship between model classes that I believe is best represented by inheritance, but the likelihood that things will change often is driving us to composition instead. So, I have a class called Autos, and subclasses called Suvs, Minis, Mids, Sports, for example. We have been requested to avoid the STI approach to this, because of fear of a quickly growing table with
2006 Jan 02
0
Best practice for registering/discovering STI subclasses?
Folks, I''m fairly new to Rails, and I''ve Googled around for an answer to this question with no luck... Consider a little blog application that has uses single-table inheritance for the handful of different content types via a Content base class and subclasses like FooContent and BarContent. That part all works well for me. Now consider the view that presents actions to the
2010 May 07
1
Can't eagerly load a polymorphic association defined in an STI parent class?
If I define an association (in my case a polymorphic one) in an STI parent class, and try to eagerly load it in a subclass, I get the following error: ActiveRecord::ConfigurationError: Association name ''myassoc'' was not found; perhaps you misspelled it? If I redefine the same association again in the STI subclass, it works. Is this a bug or what? -- You received this message
2006 May 05
4
STI and HABTM
Hey gang, How does STI work with HABTM? For instance...let''s say I have the following models ----- Category < ActiveRecord::Base Item < ActiveRecord::Base Product < Item Deal < Item ----- Each product or deal can have categories. Would I then setup Item with has_and_belongs_to_many :categories, then create a table categories_items ??? Is there a better way to do it?
2006 Apr 02
0
STI and through
I''m trying to understand how to do the following, but am finding myself stuck. I have three main tables; here are the first two: CREATE TABLE reference_items ( "id" integer primary key, "type" varchar(20), "title" varchar(255), "year" year(4) ); CREATE TABLE "agents" ( "id" integer primary key, "type"
2016 Jun 07
0
[PATCH v2 11/20] drm: sti: Rely on the default ->best_encoder() behavior
All outputs have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() implementations and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com> --- drivers/gpu/drm/sti/sti_dvo.c | 10 ---------- drivers/gpu/drm/sti/sti_hda.c
2020 Jan 10
0
[PATCH 18/23] drm/sti: Convert to CRTC VBLANK callbacks
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert sti over. Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de> --- drivers/gpu/drm/sti/sti_crtc.c | 11 ++++++++--- drivers/gpu/drm/sti/sti_crtc.h | 2 -- drivers/gpu/drm/sti/sti_drv.c | 3 --- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git
2006 Mar 16
1
Problem with STI and validation
OK. Here''s another one on STI (thanks for the help of all of you with my previous STI question, and I promise to update the wiki with the info). I''m having a prob with validation with the sub-classes. It''s a bit long-winded to explain, but I''ll post all the logs and code if there''s no obvious answers. Basically, however, I have validation on the
2016 Aug 26
0
[PATCH v8 16/18] ARM: DT: STi: stihxxx-b2120: Add DT nodes for STi audio card
This patch enables the uniperif players 2 & 3 for b2120 boards and also adds the "simple-audio-card" device node to interconnect the SoC sound device and the codec. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen at st.com> Signed-off-by: Peter Griffin <peter.griffin at linaro.org> --- arch/arm/boot/dts/stihxxx-b2120.dtsi | 45 ++++++++++++++++++++++++++++++++++++ 1
2016 Aug 26
0
[PATCH v8 14/18] ARM: STi: DT: STiH407: Add uniperif player dt nodes
This patch adds the DT nodes for the uniperif player IP blocks found on STiH407 family silicon. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen at st.com> Signed-off-by: Peter Griffin <peter.griffin at linaro.org> --- arch/arm/boot/dts/stih407-family.dtsi | 76 +++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm/boot/dts/stih407-family.dtsi
2016 Feb 12
0
[PATCH 16/17] drm/sti: removed optional dummy encoder mode_fixup function.
--- drivers/gpu/drm/sti/sti_tvout.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c index f2afcf5..24a3735 100644 --- a/drivers/gpu/drm/sti/sti_tvout.c +++ b/drivers/gpu/drm/sti/sti_tvout.c @@ -440,13 +440,6 @@ static void sti_tvout_encoder_dpms(struct drm_encoder *encoder, int mode) { } -static bool
2016 Feb 15
0
[PATCH v2 16/17] drm/sti: removed optional dummy encoder mode_fixup function.
mode_fixup function for encoder drivers became optional with patch http://patchwork.freedesktop.org/patch/msgid/1455106522-32307-1-git-send-email-palminha at synopsys.com This patch set nukes all the dummy mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha at synopsys.com> --- drivers/gpu/drm/sti/sti_tvout.c | 10 ----------
2016 Feb 12
0
[PATCH 16/17] drm/sti: removed optional dummy encoder mode_fixup function.
--- drivers/gpu/drm/sti/sti_tvout.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c index f2afcf5..24a3735 100644 --- a/drivers/gpu/drm/sti/sti_tvout.c +++ b/drivers/gpu/drm/sti/sti_tvout.c @@ -440,13 +440,6 @@ static void sti_tvout_encoder_dpms(struct drm_encoder *encoder, int mode) { } -static bool
2016 Aug 30
1
[PATCH v8 14/18] ARM: STi: DT: STiH407: Add uniperif player dt nodes
On Fri, 26 Aug 2016, Peter Griffin wrote: > This patch adds the DT nodes for the uniperif player > IP blocks found on STiH407 family silicon. > > Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen at st.com> > Signed-off-by: Peter Griffin <peter.griffin at linaro.org> > --- > arch/arm/boot/dts/stih407-family.dtsi | 76 +++++++++++++++++++++++++++++++++++ > 1
2016 Aug 30
1
[PATCH v8 14/18] ARM: STi: DT: STiH407: Add uniperif player dt nodes
On Fri, 26 Aug 2016, Peter Griffin wrote: > This patch adds the DT nodes for the uniperif player > IP blocks found on STiH407 family silicon. > > Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen at st.com> > Signed-off-by: Peter Griffin <peter.griffin at linaro.org> > --- > arch/arm/boot/dts/stih407-family.dtsi | 76 +++++++++++++++++++++++++++++++++++ > 1
2006 Apr 23
0
Severe STI, HABTM with Attributes and 1.1
All, I had been working on a project that was using STI to a very high degree. It also was using a HABTM table that had a couple extra attributes. It seems that with 1.1 push_with_attributes is deprecated and I am having a bit of trouble moving things to using has_many :through The original schema I had worked like this : create_table "nodes" do |t| t.column "title",
2016 Aug 26
0
[PATCH v8 15/18] ARM: STi: DT: STiH407: Add uniperif reader dt nodes
This patch adds the DT node for the uniperif reader IP block found on STiH407 family silicon. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen at st.com> Signed-off-by: Peter Griffin <peter.griffin at linaro.org> --- arch/arm/boot/dts/stih407-family.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/stih407-family.dtsi