search for: default_per_page

Displaying 3 results from an estimated 3 matches for "default_per_page".

2006 May 14
4
searching on foreing keys
...,name) owner_id being a foreign key of pet pointing to people name. here it is on the pet controller: @paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id like ?","%"+params[:filter]+"%"], :include =>person,:order_by => @sort_by,:per_page => default_per_page ) it searches great in name but not in owner_id. I mean it searches through people id instead of the person name it''s referring. Any idea how to make it search through the foreign key? thanx in advance Pat
2006 Apr 13
5
Changing class data in environmrnt.rb
Greetings, I have a class that should allow you define some default values. It seems to make the most sense to do this environment.rb since its the default app configuration. It currently looks like this: Settings::DEFAULT_VALUES.merge!({ :setting_one => ''foo'', :settings_two => ''bar'' }) The problem is in development mode, the values are only
2006 Aug 02
2
Ajax_Scaffold display from link table
...ategory">Category</label> <%= select ''document'', ''category_id'' , Document.find_{[p.id ] } %> </div> documents_controller.rb @paginator, @documents = paginate(:documents, :order => @sort_by, :include => :category, :per_page => default_per_page) I keep getting the following error: ActiveRecord::StatementInvalid in DocumentsController#component Mysql::Error: #42S22Unknown column ''categories.document_id'' in ''on clause'': SELECT COUNT(DISTINCT documents.id) FROM documents LEFT OUTER JOIN categories ON c...