search for: novaprospekt

Displaying 5 results from an estimated 5 matches for "novaprospekt".

2006 Jul 31
9
Multiple Pagination
I have the following: def index begin @restaurant_pages, @restaurants = paginate :restaurants, :order => (params[ :sort ] || "name"), :per_page => 2 @cuisines = Cuisine.find_all rescue redirect_to :action => :index end end # sort by cuisine def
2006 Aug 22
0
Re: Problem with find condition and habtm relationship.
...the solution lies somewhere in that direction. If I could add one more suggestion, where I feel on much surer ground: vegetarian, one i, two e''s allbests, ........................................................................ .......... John Browning On 21 Aug 2006, at 21:14, novaprospekt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > Ok. This has been troubling me for some time now. Please bare with me > while I explain the situation to make things clear. > > I''m making a restaurant directory in RoR. I have a table of > Restaurants > and a table...
2006 Aug 08
4
Find records that begin with a number
How would I go about finding all records whose first character is a number? as in find(:all, :conditions => ??????? -- Posted via http://www.ruby-forum.com/.
2006 Jul 09
1
Quick Question
I have this method in a controller def sort_by_cuisine #@restaurants = Restaurant.find(:all, :conditions => ["cuisine_id = :id", params], :order => params[:sort]) @cuisines = Cuisine.find_all end And I want to put the bulk of it in the model, but still call it from the controller. How can I do this? I''m fairly new to Ruby on Rails and I''ve tried
2007 Jun 20
1
Count_by_content ??
Is there a count_by_content alternative to the find_by_content action? This is because I''m wanting to do the following in my pagination method: def list # step 1: set the variables you''ll need page = (params[:page] ||= 1).to_i items_per_page = 20 offset = (page - 1) * items_per_page # step 2: instead of performing a find, just get a count item_count =