Displaying 20 results from an estimated 2000 matches similar to: "how to accomplish pagination in RoR"
2008 Apr 11
2
issues on Net:HTTP
in cotroller:
@url=URI.parse(''http://google.com.sg/webhp'')
@res = Net::HTTP.get_response(@clarifyurl)
in view: <%=@res.body>
this page displayed as
301 Moved
The document has moved here
what''s wrong with my code, I want to get the correct reponse HTML
content from google.
--~--~---------~--~----~------------~-------~--~----~
You received this message
2008 Apr 12
12
sqlite3.dll problem
Hi I''m triying to begin developing in ruby on rails, and I''ve instaled
all the components but there is a problem with the file sqlite3.dll.
When I try to execute my first example in my web browser apears an alert
that says sqlite3.dll is not found.
I''m working on windows XP with firefox and the server is WEBrick.
If someone knows how can I resolve the problem please
2008 Oct 27
8
pagination in ajax
hi,
I am curently using rails version 2.1.1.
Currently i have done simple pagination using will_paginate
plugin.it works.but when i am trying pagination using ajax
with help of will_paginate plugin
it wont works.i am also using RemoteLinkRenderer helper,
but it gives an error uninitialized constant RemoteLinkRenderer.
can anyone provide any tutorial or sample code so that i can
2009 Aug 18
4
pagination problem....
Hi,
please help...
In controller...
def index
@customers = Customer.find(:all)
pagination code here....
end
In index.html.erb
Displayes list of customers and has pagination 1,2,3,4...etc.
On clicking page 2, it will again run this(Customer.find(:all)) query in
controller. So, there will be lack of performance.
So, how to increase the mysql performace? Can i use the index as below
or any
2010 Aug 24
11
will_paginate problem
Hi
I am using rails 2.3.8 & ruby 1.3.7 & will_paginate 2.3.14
I have table name books. I am doing this code for pagination,
In book_controller
@@@@books = Book.paginate :page => params[:page], :per_page => 10@@@@
& in index.html.erb
@@@@@<%= will_paginate @books %>@@@@@
Also added in environment.rb file this line
@@@@@ require
2008 Mar 31
10
Paginate with Rails 2.0.2 question
Hi,
So I''m using @post_pages, @posts = paginate :posts, :per_page => 10
to paginate.
But I have rails 2.0.2 on my VPS. Now this version of paginate throws
an error. What happened to classic pagination and what is done now?
Thanks,
Ron
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
2007 Dec 10
4
Need help in Ajax Pagination
hi All,
i wants to implement ajax pagination but i am facing a lot of
problem , i found i lots of links on google but their is no
explanation like what object we have to pass and condition can any
body help me out in this concern pls i need your help as soon as
possible
thanks
sachin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines :
partial = render_to_string( :partial => "#{file}", :formats =>
[:html] )
to the pagination_partials function.
=================================================
WORKING CODE:
=================================================
def render_format_search_partial(file, options={})
# TODO remove this line to use the one
2009 May 18
3
Pagination
Hi,
I am using the will_paginate plugin for my application.
It is showing Previous 1,2,3...22,23,24 Next links
How will I hide the numbers?
I want to have first and last links also. How will i do that?
Thanks in advance.
--
Posted via http://www.ruby-forum.com/.
2008 Apr 11
7
Net::SMTPAuthenticationError
Hey guys,
I want to send an email via ROR and I have put this code at the very end
in the config/environment.rb file-
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.logger = nil
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.smtp_settings = {
:address => "[my smtp server]",
:port => 25,
:domain
2010 Jan 21
2
will_paginate ?
Does anyone have experience with will_paginate?
I''m trying to use it with acts_as_ferret.
routes.rb
...
map.search ''/search'', :controller => ''notes'', :action => ''search''
notes.rb
...
acts_as_ferret :fields => [ ''body'' ]
notes_controller.rb
...
def search
if params[ :query ]
@query = params[
2010 Jul 30
1
pagination
Pagination
I am using an old tutorial which is tripping me right up as I have the
latest version of rails installed. I''m persisting as I think I''m
learning a little bit more about how RoR works. However after installing
the scaffolding plug-in to fix an earlier problem I now have a problem
with the pagination. I have followed this workaround:
2009 Nov 26
6
will_paginate don't work on jruby platform
Hello all,will_paginate don''t work on jruby platform,
the Model.paginate find works ok, accepts all kinds of params,
this is config.gem
config.gem ''will_paginate'', :version => ''2.3.11'', :source =>
''http://gemcutter.org'',
but <%= will_paginate @collection %> doesn''t work
it always produce nil(so nothing on page).
2009 Nov 03
2
will_paginate pagination problem
hi;
i use will_paginate the first page come true but all other page get the
same data of first page i checked in controller "page" parameter works
true but paginate get only first page''s data and shows these data in all
pages
forexample first page seen A,B second page also seen A,B but second page
must be C,D
my code is;
controller :
@list = Company::Env.paginate :page =>
2009 Aug 24
4
will_paginate: pagination links are wrong
I put everything in a pastie to make it a bit more readable:
http://pastie.org/593379
This is the gist:
Will_paginate doesn''t play quite nice. The first result set is fine,
and when I click on one of the paginated links, it returns the following
error:
Couldn''t find DictatedExam with ID=filter_widget
observe_field triggers filter_widget which calls the paginated search..
Which
2008 Apr 15
1
How to call a java applet in rails application?
HI,
I have a applet file named "Scanner.class" which will scan and upload
image to the web server from Scanners.
I have couple of doubts in accessing that applet file.
1. How to call this applet from rhtml file, and where should i place
this file.
2. I also use some external jar files which i imported in my applet
file, where should i place these jars?
Thanks,
Ratnavel
--
Posted
2008 Apr 18
2
deploying in local machine
hi all,
i was given a project which keeps track of employee''s
information.and the project is running at present in my office now.i
checked out the project source from subversion and stored in my local
machine to make some enhancements.what are the things i need to do to
make the application run in my local machine.the application was written
in ror and im new to it.friends
2008 Jun 21
15
will_paginate generates undefined method paginate
Dear
I used to use the will_paginate plugin, and now it is no longer
available in the repository.
I am using the one in the gem
#gem install will_paginate
in my controller I have this
@careers = Career.paginate :page => params[:page], :per_page => 10
and in the view
<%= will_paginate @careers %>
I found this way in all the tutorials and the railscasts episode 51.
Though I still
2011 Feb 17
1
Adding images for pagination links in will_paginate
Hi,
I am using will_paginate for pagination.
I have to show only Previous and Next links, that I have achieved by
":page_links=>false" parameter.
Now I want to show the images instead of "Previous" and "Next" labels.
Can anyone tell how to achieve this in will_paginate?
Thanks,
Tushar
--
Posted via http://www.ruby-forum.com/.
--
You received this message
2007 Jul 24
9
will_paginate plugin doesn't work with Association Extensions?
I have:
class Post < ActiveRecord::Base
has_many :comments do
def published
find( :all,
:conditions => {:published => true} )
end
end
end
When in my controller I do
Post.find(:first).comments.published.paginate :page => params[:page]
I get an error
undefined method `paginate'' for []:Array
Is will_paginate supposed to