[Sdruby] has_one :problem

Nathan Colgate Clark nathancolgate at gmail.com
Mon Nov 6 22:27:02 GMT 2006


Probably, Yeah.  Try passing it with your pagination_links method.  If i 
remember from Friday:

pagination_links(@results, {:query => params[:query], :status => 
params[:status]})

might get you some links like:

/search?query=apollo&status=1

where 1 is "open" or whatever.

Good luck.


Patrick Crowley wrote:
> Ok, thanks guys. That works great for my "show" action.
>
> But it doesn't seem to work when I try to paginate across a list of 
> theaters (when showing search results). Do I need to add the status 
> table to my query?
>
> Thanks,
> Patrick
>
>
> On Nov 6, 2006, at 2:00 pm, Chris Abad wrote:
>
>> I think you need this:
>>
>> :theater belongs_to :status (rather than has_one :status). Then add 
>> status_id to your theaters table.
>>
>> You can then call the status name like this:
>>
>> <%= theater.status.name %>
>
> _______________________________________________
> Sdruby mailing list
> Sdruby at lists.sdruby.com
> http://lists.sdruby.com/mailman/listinfo/sdruby
>


-- 
Nathan Colgate Clark
Web Designer and Architect
Brand New Box
(619) 322-9459
www.brandnewbox.com



More information about the Sdruby mailing list