search for: component_id

Displaying 14 results from an estimated 14 matches for "component_id".

Did you mean: component_0
2006 Jul 17
2
actionmailer / @recipeints
Hi all, i''m trying to email multiple people based on certain criteria. i do a search like @stacks = Group.find(:all, :conditions => ["component_id = ?", 2]) this populates stack to contain multiple groups with component_id =2. How do i populate @recipients to contain all possible @stack.email. Let me clearify. Each stack has its own email, and i need to include each stack.email into @recipients. i''ve been trying to do @sta...
2008 Aug 27
11
find_by_sql and xml_serializer problems
...and am getting an odd error when trying to render the result to xml. The find is: children_list = find_by_sql("SELECT components.componentid, components.logicalname, versions.level, versions.branch, versions.sequence FROM components, versions where components.componentid = ''" + component_id + "''" + " AND versions.componentid = ''" + component_id + "''") When I do a render :xml I get this: /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ serializers/xml_serializer.rb:308: warning: Object#type is deprecated; use Object#...
2013 Jul 21
4
how to use activemodel collection.build for a has_many :through association
Hi all, In my controller I am doing the following to populate a nested form for a has_many through association: def new @specification = Specification.new Component.find_each.each do |component| @specification.component_specifications.build(:component_id => component.id) end The idea being whenever someone creates or edits a form, it will be populated with all components at that time so that when they save those components that specification will be associated with the newly created specification. The problem I am having is I can'...
2008 Apr 09
3
help with model relationship for Product/Bill of Materials
...oduct can either be a single item, or a package consisting of several other products. I have created a table: ---- class BomItem < ActiveRecord::Base belongs_to :product belongs_to :component, :class_name=>''Product'', :foreign_key=>''component_id'' validates_numericality_of :quantity ---- So for a product p, I can have: bom=p.bom_items item=bom[0] etc and for each item I can have: c=item.component (which is a product) Now for c I would like to be able to ask c.component_of at the moment, I can only think to set up a product m...
2006 Apr 19
2
Using Reflections to find out ActiveRecord class association
...o Component.reflections[:branches].active_record I would expect that to be Branch but it is in fact Component. The inspection of Component.reflections is as below {:branches=>#<ActiveRecord::Reflection::AssociationReflection:0x37d86d8 @active_record=Component, @primary_key_name="component_id", @options={}, @name=:branches, @macro=:has_many> How can I get what class the has_many is to? I am using Rails 1.1/Ruby 1.8.2 Thanks, Steve Tuckner -- Posted via http://www.ruby-forum.com/.
2006 Mar 24
1
Multiple table relationships
...elopment and have the following table structure. I understand how to do a two table has many join but I actually need to relate a third table. Here is my structure: components id name updated_at elements id name updated_at element_types id name updated_at components_elements component_id element_id element_type_id updated_at My Component model has the following: class Component < ActiveRecord::Base has_and_belongs_to_many :elements end I haven''t actually added anything to my Element model but suspect that it also needs a habtm association. My bigger issue is,...
2012 Nov 05
2
[PATCH] x86/ACPI: invalidate BGRT
...D 2 +#define ACPI_MPST_HOT_PLUG_CAPABLE 4 + +/* Memory Power State Structure (follows POWER_NODE above) */ + +struct acpi_mpst_power_state { + u8 power_state; + u8 info_index; +}; + +/* Physical Component ID Structure (follows POWER_STATE above) */ + +struct acpi_mpst_component { + u16 component_id; +}; + +/* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ + +struct acpi_mpst_data_hdr { + u16 characteristics_count; +}; + +struct acpi_mpst_power_data { + u8 revision; + u8 flags; + u16 reserved1; + u32 average_power; + u32 power_saving; + u64 exit_latency; + u64 reserv...
2007 Apr 17
0
8 commits - configure.ac doc/Makefile.am libswfdec/jpeg libswfdec/swfdec_debug.h libswfdec/swfdec_image.c
...scan"); - - length = get_be_u16 (bits); - bits->end = bits->ptr + length - 2; - OIL_DEBUG ("length=%d", length); - - n_components = get_u8 (bits); - n = 0; - dec->scan_h_subsample = 0; - dec->scan_v_subsample = 0; - for (i = 0; i < n_components; i++) { - int component_id; - int dc_table; - int ac_table; - int x; - int y; - int index; - int h_subsample; - int v_subsample; - int quant_index; - - component_id = get_u8 (bits); - dc_table = getbits (bits, 4); - ac_table = getbits (bits, 4); - index = jpeg_decoder_find_component_by_id...
2007 Jul 21
0
12 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/jpeg libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...dex; + int idx; int h_subsample; int v_subsample; int quant_index; @@ -920,22 +920,22 @@ jpeg_decoder_start_of_scan (JpegDecoder tmp = jpeg_bits_get_u8 (bits); dc_table = tmp >> 4; ac_table = tmp & 0xf; - index = jpeg_decoder_find_component_by_id (dec, component_id); + idx = jpeg_decoder_find_component_by_id (dec, component_id); - h_subsample = dec->components[index].h_sample; - v_subsample = dec->components[index].v_sample; - quant_index = dec->components[index].quant_table; + h_subsample = dec->components[idx].h_sample; + v_s...
2012 Nov 07
0
[PATCH v2] x86/ACPI: invalidate BGRT if necessary
...D 2 +#define ACPI_MPST_HOT_PLUG_CAPABLE 4 + +/* Memory Power State Structure (follows POWER_NODE above) */ + +struct acpi_mpst_power_state { + u8 power_state; + u8 info_index; +}; + +/* Physical Component ID Structure (follows POWER_STATE above) */ + +struct acpi_mpst_component { + u16 component_id; +}; + +/* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ + +struct acpi_mpst_data_hdr { + u16 characteristics_count; +}; + +struct acpi_mpst_power_data { + u8 revision; + u8 flags; + u16 reserved1; + u32 average_power; + u32 power_saving; + u64 exit_latency; + u64 reserv...
2005 Dec 19
2
Advanced search/filter use cases
I''ve been working on an application lately that has a lot of advanced search and filtering functionality (with ranges and substring searches for each attribute). Despite being a pretty common use case, this isn''t supported particularly well by any framework I''ve used, including Rails. I''d like to fix that. :) Right now, my major pet peeves are: 1. Long,
2007 Apr 18
2
libswfdec/jpeg
libswfdec/jpeg/jpeg_rgb_decoder.c | 1 - 1 files changed, 1 deletion(-) New commits: diff-tree 15ed4a69b4ffc265fe103ba79a0b60af7e42a9fa (from 2073f39bc0b0aa90f1f67def9bb3f0c6b68018ae) Author: Benjamin Otte <otte@gnome.org> Date: Wed Apr 18 10:47:06 2007 +0200 remove leftover debugging statement diff --git a/libswfdec/jpeg/jpeg_rgb_decoder.c b/libswfdec/jpeg/jpeg_rgb_decoder.c
2006 Nov 06
21
acts_as_ferret and associations
I have the following models: class Book < ActiveRecord::Base acts_as_ferret belongs_to :author end class Author < ActiveRecord::Base has_many :books end and in the controller: def search if params[:query] @query = params[:query] @total, @books = Book.full_text_search(@query, :page => (params[:page]||1)) @pages =
2007 Feb 13
0
libswfdec/jpeg libswfdec/swfdec_image.c
..._components = get_u8 (bits); n = 0; @@ -521,27 +498,25 @@ jpeg_decoder_sos (JpegDecoder * dec, bit syncbits (bits); - JPEG_DEBUG ("component %d: index=%d dc_table=%d ac_table=%d n=%d", + OIL_DEBUG ("component %d: index=%d dc_table=%d ac_table=%d n=%d", component_id, index, dc_table, ac_table, n); } dec->scan_list_length = n; spectral_start = get_u8 (bits); spectral_end = get_u8 (bits); - JPEG_DEBUG ("spectral range [%d,%d]", spectral_start, spectral_end); + OIL_DEBUG ("spectral range [%d,%d]", spectral_start, spectral_en...