search for: vlkfan

Displaying 7 results from an estimated 7 matches for "vlkfan".

Did you mean: vlan
2006 May 29
4
has_many <-> belongs_to trouble
Hi all, finally im starting with rails, i have a simple relationship has_many ans belongs_to that i dont now how to manage the update action, here are my models class Item < ActiveRecord::Base has_many :images end class Image < ActiveRecord::Base belongs_to :item end And my table structure: Items => id, title, desc Images => id, image, item_id ok, i have a number of
2006 May 30
6
How to solve "Marshal Data Too Short" error?
Hi I''ve got the error in the log file "marshal data too short" after I try to store some data into session. After doing some research on the internet, it looks like the problem was caused by pstore.rb. It is there way to solve this problem? Thank you -- Posted via http://www.ruby-forum.com/.
2006 May 26
8
What is the different between Scaffold / Controller / Model
Hi everyone I am learning RoR now and got a question. What is the different between using ruby script/generate <Table> Scaffold / Controller / Model? Thank you Victor -- Posted via http://www.ruby-forum.com/.
2006 May 12
0
Using primary key that is not named "id"
Hi I am using a legacy database that the primary key is named "ProductID" and its type is SERIAL (or INT NOT NULL auto_increment). set_primary_key "ProductID", is added to the Product class Then I used >ruby script/generate scaffold Product Admin to generate my controllers. When I try to insert a new product in the products table, it gave me this error RuntimeError:
2006 May 23
0
return value from collection_select
Hi everyone I am trying to get the return value from collection_select helper method. Here is what I did collection_select(''product'', ''product_id'', @products, ''id'', ''name'', {}, {:onchange => remote_function(:url => {:action => :myFunction}, :with => "this[this.selectedIndex].value")}) then in my
2006 May 11
4
Legacy database problem
Hi I am trying to use Ruby on Rails to work with an existing database. The problem is that, all the table names begin with a captial letter (e.g. Products). So I did the following changes in environment.rb, I''ve added under # Include your application configuration below ActiveRecord::Base.pluralize_table_names = false In class Product, I''ve added set_table_name
2006 Jul 25
2
Losing precision while copying interval type data (Postgres)
Hi I am trying to use active record to copy some data. One of the entry I am copying is type interval (Postgres); however, it lose some precision after I copied that column. Here is what I did: @newData.elapsedtime = @oldData.elapsedtime @newData.save Result: both displayed as 00:00:02.453 in the table, however, if I use the following command to convert its value into float ( SELECT