Displaying 5 results from an estimated 5 matches for "attribute_values".
2005 Dec 21
2
ActiveRecord Error with << in Collection
Hi
I get a following error:
ActiveRecord::AssociationTypeMismatch in Cmdb#create
ConfigurationItemAttributeValue expected, got Array
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_collection.rb:128:in
`raise_on_type_mismatch''
2006 Sep 26
4
Some documents not found
...h {|a|
sym = a.productId.to_sym
attr_cache[sym] = [] if !attr_cache[sym]
attr_cache[sym] << a
}
# now populate the index with data
puts "indexing #{products.size} products..."
products.each {|prod|
index << prod.index_document(:keywords => kwcache, :attribute_values
=> attr_cache)
}
end
### --- updater ---
index = Ferret::Index::Index.new(:path => ''search-index'', :analyzer =>
Ferret::Analysis::AsciiStandardAnalyzer.new )
index.delete(:id, product.id)
index << product.index_document
index.close
### --- Vandelay::Product::...
2006 Jun 26
1
How to model attribute and attribute-value dependencies
I''m being sneaky and reposting this question; I got no anwsers perhaps
because I posted it over the w/end. I apologize for this but I''m
completely stumped and need either an answer or some clue about how my
approach is flawed. Thanks...
I have a rails application which has a table ''cells'' which contains
some 80 or so attribute fields (related to the electrical
2011 Jul 26
0
active record wants root password, not sure why ..
When I run a command program (rails 3/ruby 1.9.2) as this:
class MsdsAttr < ActiveRecord::Base
include MsdsAttrModule
belongs_to :attribute_record, :polymorphic => true
has_many :attribute_values, :foreign_key => ''attribute_id''
has_many :alt_values, :as => :alternative
has_many :msds_ingredients
end
ActiveRecord::Base.establish_connection(
:adapter => "mysql",
:host => "localhost",
:database => "univ_parse_dev",
:user =>...
2011 Jul 25
4
Rails 3 test database issues
I am having a problem using the test database in Rails 3. It
apparently has kept track of aspects of the database that I deleted
completely from my migrations at some point. I don''t always use the
''down'' part of a migration and sometimes just recreate the whole
database. I did rake db:migrate:reset and rake db:test:prepare, but
when I run my test it is trying to access