Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Achieving what I want to
- # view #
- # with is the power
- <%= observe_field :suchbegriff,
- :frequency => 0.2,
- :loading => "Element.show('spinner1')",
- :complete => "Element.hide('spinner1')",
- :update => "webloglist",
- :url => { :action => "search_title",
- :controller => "weblog"},
- :with => "search" %>
- %= pagination_links @weblog_pages,
- :window_size => 3,
- :params => {:search => params[:search] } %>
- # controller #
- def search_title
- suchbegriff = '%' + params[:search] + '%'
- @weblog_pages, @weblogs = paginate :weblogs,
- :per_page => 10,
- :order => 'id desc',
- :conditions => ["title like ?", suchbegriff]
- render :partial => "list", :layout => !request.xhr?
- end
Add Comment
Please, Sign In to add comment