search for: film_id

Displaying 4 results from an estimated 4 matches for "film_id".

Did you mean: file_id
2006 Jan 09
1
Saving an upload
...ULL, length character varying NOT NULL, description text NOT NULL, release_date date NOT NULL, file_url character varying NOT NULL, size double precision NOT NULL, picture_id integer NOT NULL REFERENCES pictures(id), primary key (id) ); CREATE TABLE films_pictures ( film_id integer NOT NULL, picture_id integer NOT NULL, "position" integer NOT NULL, primary key (film_id, picture_id) ); Here''s the Ruby: film.rb: class Film < ActiveRecord::Base has_and_belongs_to_many :pictures, :join_table => "films_pictures" attr...
2006 May 18
1
ActiveRecord problems from within template
...sonnel_type="live_action_personnel"'' If I try and test this for emptiness: if @film.live_action_personnel.size > 0 I get the following error: MysqlError: Unknown table ''credit_types'' in where clause: SELECT count(*) AS count_all FROM credits WHERE (credits.film_id = 16 AND (credit_types.personnel_type="live_action_personnel")) but if I debug(@film.live_action_personnel) earlier within the same template, all is well! It seems that ActiveRecord isn''t generating the right query when I only need to count the number of records. Anyone know a...
2006 Aug 15
1
Problem with joining...
Hello, I am quite new to Rails and i was wondering if i could get some help to populate a join table? I got (for example) a table called films, a table called acteurs and a join table called acteurs_films. I have specified the HABTM relationship and I manage to do it through the console by doing: acteur=Acteur.new acteur.name="blabla" acteur.films << film acteur.save and
2006 Apr 04
3
newbie - HABTM problems writing to Join Table in SQL
...l => false t.column "biography", :text, :default => "", :null => false end create_table "directors_films", :id => false, :force => true do |t| t.column "director_id", :integer, :default => 0, :null => false t.column "film_id", :integer, :default => 0, :null => false end create_table "films", :force => true do |t| t.column "title", :string, :default => "", :null => false t.column "release_date", :date, :null => false end end ------director.r...