[Rails] belongs_to. Association methods don't pass data to DB

2010-06-29 Thread P.A.
Hi. I have a problem with the association methods which passed to a model through a belongs_to declaration. Here's an illustration of the issue: GIVEN: # migration class CreateArticlesAndAuthorsTables ActiveRecord::Migration   def self.up create_table :articles do |t|   t.text 

[Rails] Re: belongs_to. Association methods don't pass data to DB

2010-06-29 Thread P.A.
select * from authors; id = 1 name = Pavel sqlite select * from articles; id = 1 title = 'one' author_id = 1 id = 2 title = 'two' author_id = 1 On 29 июн, 19:30, P.A. shama...@hotmail.com wrote: Hi. I have a problem with the association methods which

[Rails] Re: belongs_to. Association methods don't pass data to DB

2010-06-29 Thread P.A.
I was most interested about that methods which are added by belongs_to declaration not has_many. Anyway, thanks for help, Colin. On 29 июн, 20:47, Colin Law clan...@googlemail.com wrote: On 29 June 2010 17:29, P.A. shama...@hotmail.com wrote: I got it. It should to break the creation

[Rails] javascript_include_tag and stylesheet_link_tag additional generated parameters

2010-06-10 Thread P.A.
Hi. I just wonder why do the javascript_include_tag and stylesheet_link_tag methods generate additional parameters and add them to the paths on output? For example, I have the following view: # app/views/test.haml %html %head = stylesheet_link_tag 'styles.css' =