search for: publisher_ids

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

Did you mean: publisher_id
2006 Jun 09
1
finder_sql issue with has_many :through
I have an inner join query that Action Record can''t seem to pull off conventionally, so I''m trying to use :finder_sql to utilize an sql query that works beautifully in SQL. The problem is, when I try to call the method, I get the following: private method `gsub'' called for #<Array:0x267de04> Here is my has_many code: has_many :mod_privileges,
2006 Jan 23
2
problem with options_for_select
...e database. In order to so so I am passing it the @book.publishers array, but I suppose I am missing something. The docs say that the selected element may be an array of values, but I can''t get it to work. Any ideas? My code is below. Thanks in advance. Sean <select name="publisher_ids[]"> <%= options_for_select (@publishers.map {|p| [truncate (p.publisher_name, length = 30, truncate_string = "..."), p.id]}, @book.publishers )%> </select>
2005 Jun 13
3
validations not working with collection population droplists
I have an ADD form with foreign key field values selectable via select list ( collection_select (...)). When I add validates_presence_of :someotherfield to my model for error trapping, I get the following error for each droplist: NoMethodError in Reviews#create_curriculum Showing /reviews/_form.rhtml where line #16 raised: undefined method `inject'' for nil:NilClass Extracted source
2005 Mar 08
19
find_by_sql ON STEROID possible?
find_by_sql BREAKS THE OOP BEAUTY and perhaps we can solve that. NAMING CONVENTIONS can perhaps make find_by_sql much more clever. lets imagine that relation: publishers <- books <-> authors_books <-> authors -> universities (can''t find something else than university for that last association :) ) imagine we want to fetch every book and every associated