Displaying 20 results from an estimated 500 matches similar to: "Simple Namespace Question"
2006 Aug 01
3
paginate, search, sort with ajax problem
hello I hope somebody can help me figure this out.
found this great tutorial at http://dev.nozav.org/rails_ajax_table.html.
got it working except for one thing.
I can''t seem to make the pagination work. The link_to_remote defined in
the helper is pointing to the wrong url.
I have set up things like so:
defined a search method in de project_controller located in
apps/admin/project.
2006 Apr 18
1
Pagination links with separator
Hi,
I have @result_pages and @results obtained from paginate in an action. I
want to show the pages as
1 | 2 | 3 | 4 >
The fifth page will show:
< 5 | 6 | 7 | 8 >
and so on.
How exactly do I render the paginator to give this effect? I guess I
will have to use pagination_links_each. But being new to Rails, I need
help.
Thanks,
Yash
--
Posted via http://www.ruby-forum.com/.
2005 Mar 10
0
Need Help with Flaky FastCGI on Windows
Hi Everyone -
I have a rails 0.10.1 application deployed on a Windows 2003 server
under XAMPP Lite 1.4.12. Running under CGI, the application works fine
(a bit slow, obviously, but no problems).
When I run under FastCGI, the app is fine until I leave it alone for a
few hours. For example, last night I switched it to FastCGI and
everything seemed to be working fine. When I woke up this
2006 Jan 19
8
Pagination_links without "?page=" but with params[:id]
Hello,
With default pagination I have this :
<a href="/users/infos/3?page=1">1</a>
<a href="/users/infos/3?page=3">3</a>
but i need this :
<a href="/users/infos/1">1</a>
<a href="/users/infos/3">3</a>
I need to remove the "?page=" parameters and rewrite a little the link ( with a link_to ? )
2006 Apr 07
0
How to combine rjs with ActiveView::Helper?
Suppose in controller:
class ArticlesController < ApplicationController
def search
...
render :update do|page|
page.replace_html ''panel_tab_searchresults'',:partial => ''article'',
:object =>@articles
end
end
And i want to add ajax styled Paginator to the view,i have got the
method and i can work well directly used in view:
2006 Nov 08
0
Paginating a fetched resultset problems with next/previous
Im using this paginate function to paginate complex sql queries
http://www.bigbold.com/snippets/posts/show/389, all seems to work fine
but theres one thing, when i hit the next link it show nothing, i mean
it only shows the first page, here is the code im using:
#application.rb-----------------
def paginate_collection(collection, options = {})
default_options = {:per_page => 10, :page
2007 Aug 01
1
PaginationHelper load_missing_constant error
I just ran into this error after updating rails and the
rspec_on_rails plugin (both are on edge):
/Users/ben/Work/wizzdl/vendor/rails/activerecord/lib/../../
activesupport/lib/active_support/dependencies.rb:263:in
`load_missing_constant'': uninitialized constant
ActionView::Helpers::PaginationHelper (NameError)
from /Users/ben/Work/wizzdl/vendor/rails/activerecord/
2006 Apr 27
2
How to override pagination_links method
I intend to override pagination_links method.
I added following lines of code in application_helper.rb
module ActionView
module Helpers
def pagination_links(paginator, options={}, html_options={})
raise("boom!!")
end
end
end
But my code is not executing my code. The view is still using the method
pagination_links from rails.
What''s the correct way to override
2006 Feb 15
0
Confused by this error when trying to use ''pagination''
Trying to create stuff without resorting to scaffold command.
I have a list view in my login_controller.rb file...
def list_users
@user_pages, @users = paginate :users, :per_page => 14
end
I have a command in my list_users.rhtml file which undoubtedly calls
this pagination...
<%
odd_or_even = 0
for user in @users
odd_or_even = 1 - odd_or_even
%>
and instead of being presented a
2006 Jul 17
2
DB Admin Console
Over the past few months, I''ve developed an administrative console for
databases in the process of solving other problems.
At the moment, the state of development is:
* Going to /admin_panel/model will bring you to a list of items in the
model:
* Supports acts_as_list via drag/drop sorting
* Supports "activated" via an activated/deactivated button
* Supports basic
2007 Sep 05
1
AAF and DRb with highlighting
How would I change this method in order to get highlighting working with
DRb? I''ve given up on searching on Google, I''m getting no results that
are actually helpful.
def self.find_storage_by_contents(query, options = {})
# Get the index that acts_as_ferret created for us
index = self.aaf_index.ferret_index
results = []
default_options = {:limit => 10,
2001 Mar 10
0
patch to add device-option to ogg123 rc file
Below is a patch for vorbis-tools-1.0beta4 ogg123.
It adds support for using the rc file (like /etc/ogg123.rc) for
configuring the device-options. In addition, comments can be used (when
they start a line).
My ~/.ogg123rc:
default_device=oss
default_options=dsp:/dev/audio
Please share your comments.
Jeremy C. Reed
http://www.reedmedia.net/
diff -u
2006 Jul 22
3
How do you find out what action rendered a page
Hi I have this list page that has some rjs templates updating parts of
it including a table of results. i''m trying to put pagination on the
table. thing is lots of different actions update the table and they have
their own paginators.
anyway i have this code at the bottom which worked for another page
<%=
pagination_links_each(@offer_pages,:window_size =>4) do |n|
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
In my model Topic:
acts_as_ferret({ :fields => {:username => {:store => :yes, :boost =>
30}, :subject => {:store => :yes, :boost => 20}, :body => {:store =>
:yes, :boost => 10}}, :remote => true }, { :analyzer =>
Ferret::Analysis::RegExpAnalyzer.new(/./, false) })
def self.full_text_search(q, options = {}, find_options = {})
return nil if q.nil? or
2007 Oct 03
3
Pagination problem with acts_as_ferret
Hi,
am using this wonderful plugin acts_as_ferret and according to the
tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic
I worked it out except the pagination feature.
If I have 12 records and I give limit to 10, its correctly displaying 10
records in the first page and is giving the link to the second page too.
But when I go to the next page I find the same 10 records instead of
2006 Jul 27
0
Override default Rail Generator options
I''ve been hacking at this for hours now.
I found a method called ''default_options'' in Rails::Generator::Base. By
default it calls ''default_options :collision => :ask, :quiet => false''.
I''d like to over ride it with my own options. It works if I just change
it in the Rails source but thats not a real solution.
Is there any way to set
2012 Jan 25
0
Paperclip preserve files ?
Hi,
I am using paperclip to upload files. The problem I am facing is,
based on my object property I need to preserve my file. Means my object
should be deleted from db but the file need to be restored.
I am using the option :preserve_files => true.
If I keep the above option in model it will be access to all the
objects of the model. I need to restore only for limited objects.
2009 Feb 03
1
Passing args to generator
I have some default_options in generator and when I wish to change they
value with --option_name I get only logical true instead of string
...
default_options :option_name => "Some string"
...
def add_options!(opt)
opt.separator ''''
opt.separator ''Options:''
opt.on("--option_name","Some Text") { |v| options[:option_name] = v
2007 Jul 18
5
Strange search result with conditions in find_by_contents
Hi, guys:
Strange search result with conditions in find_by_contents!
first of all, i''ve installed the acts_as_ferret to my project vender
folder by ''ruby script/plugin install
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret''
in my SearchController
def searchforum
if !params[:doSearch].nil?
if params[:searchTerms].nil? || params[:searchTerms] ==
2007 May 24
2
Missing RspecScaffoldGenerator
Just a quick note that I had to make the following change after
installing 1.0.2 as rails plugins to get the resource generator
working:
Index: rspec_scaffold_generator.rb
===================================================================
--- rspec_scaffold_generator.rb (revision 2022)
+++ rspec_scaffold_generator.rb (working copy)
@@ -1,4 +1,4 @@
-class RspecResourceGenerator <