My Controller:

class VideoSearchesController < ApplicationController
  def index

    @videos =[]

    if params[:search]

     @videos = Video.search(params[:search], :page => params
[:page], :per_page => 10, :match_mode =>  :all,
                                          :field_weights =>
{:is_partner => 1, :popularity => 1})
    end
  end
end

My index view:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml";>

<head>
  <title>Video Search</title>
<link href="stylesheets/table_style.css" rel="stylesheet" type="text/
css" />

</head>

<body>
  <h1 id="#hor-minimalist-a th">Video Search</h1>

  <% form_tag 'video_searches', :method => 'get' do -%>
  <p>
    Enter terms <%= text_field_tag :search, params[:search] %>
  </p>


  <p>
    <%= submit_tag "Search", :name => nil %>
  </p>
<% end %>
 <script type="text/javascript" src="javascripts/SWFobject.js"></
script>

 <h2> Total number of results = <%[email protected]%> </h2>
<table id="gradient-style" summary="Videos Results">
    <thead>
        <tr>
          <th scope="col">Title</th>
          <th scope="col">Service</th>
          <th scope="col">Service Tags</th>
          <th scope="col">Key Value Pairs</th>
          <th scope="col">Video</th>
          <th scope="col">Action</th>
        </tr>
    </thead>
    <tbody>
        <% @videos.each do |video| %>
          <tr>
            <td><%=video.title%></td>
            <td><%=video.service%></td>
            <td><%=video.cached_tag_list%></td>
            <td><%=video.key_value_pairs%></td>
            <td>
                <div id="flashcontent <%=video.id%>">
                  This text is replaced by the Flash movie.
                </div>
            </td>
            <td><%= link_to "Delete", 'video_searches', :method
=> :delete %> </td>
          </tr>
            <script type="text/javascript">
            var s1 = new SWFObject("flash/player-
licensed.swf","theplayer","300","250","9","#FFFFFF");
            s1.addParam("allowfullscreen","true");
            s1.addParam("allowscriptaccess","always");
            s1.addParam('allownetworking','all');
            s1.addParam('flashvars','file=<%=video.file_url%>&image=<
%=video.thumbnail_url%>&skin=http://www.longtailvideo.com/jw/upload/
stylish.swf');
            s1.write("flashcontent <%=video.id%>");
            </script>
            <% will_paginate @videos %>
          <%  end %>

    </tbody>
</table>

</body>
</html>







On Aug 3, 6:36 pm, James Healy <[email protected]> wrote:
> smeed652 wrote:
> > I'm using the latest version for both ThinkingSphinx (1.2.5) and
> > mislav-will_paginate(2.3.11) and I get the exception. I've seen a
> > number of write-ups on this but never the solution--at least for what
> > I can tell.
>
> > Here is the exception and the associated code.
>
> What does your controller look like?
>
> -- James Healy <jimmy-at-deefa-dot-com>  Tue, 04 Aug 2009 11:36:25 +1000
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to