Search the web
Sign In
New User? Sign Up
id-ruby · Komunitas Pengguna Ruby Indonesia
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Mau tanya tentang paginate   Message List  
Reply | Forward Message #5303 of 5721 |
Re: [id-ruby] Mau tanya tentang paginate

udah di require 'paginate' lum mas di controllernya?

klo saya sih pakenya will paginate, bisa paginate array collection juga.

semoga bisa membantu.

Regards,
Marcelino Ponty
"Ad Maiorem Dei Gloriam"






________________________________
From: doni <idan_manchester@...>
To: id-ruby@yahoogroups.com
Sent: Wednesday, June 24, 2009 2:15:33 PM
Subject: [id-ruby] Mau tanya tentang paginate





saya punya code nih yang error

undefined method `paginate' for #<ArticlesControlle r:0x47052ac>

app/controllers/ articles_ controller. rb:5:in `index'

dan ini code nya

def index
if params[:category_ id]
@articles_pages, @articles = paginate(:articles, :include => :user,:order =>
'published_at DESC',:conditions => "category_id= #{params[ :category_ id].to_i}
AND published=true" )
else
@articles = Article.find_ all_by_published (true)
@articles_pages, @articles = paginate(:articles, :include => :user,:order =>
'published_at DESC',:conditions => "published = true")
end
respond_to do |wants|
wants.html
wants.xml { render :xml => @articles.to_ xml }
wants.rss { render :action => 'rss.rxml', :layout => false }
wants.atom { render :action => 'atom.rxml', :layout => false }
end
end

undefined method `paginate' for #<TopicsController: 0x46fcfbc>

app/controllers/ topics_controlle r.rb:6:in `index'

def index
@forum = Forum.find(params[ :forum_id] )
@topics_pages, @topics = paginate(:topics, :include => :user,:conditions =>
['forum_id = ?', @forum],:order => 'topics.updated_ at DESC')
respond_to do |format|
format.html # index.rhtml
format.xml { render :xml => @topics.to_xml }
end
end

udah mentog banget nih, kawan2 yang bisa bantu saya minta tolong kasih tau
errornya sebelah mana atau saya harus tambah will_paginate plugin???







[Non-text portions of this message have been removed]




Wed Jun 24, 2009 10:19 am

kaosrobekrobek
Online Now Online Now
Send Email Send Email

Forward
Message #5303 of 5721 |
Expand Messages Author Sort by Date

saya punya code nih yang error undefined method `paginate' for #<ArticlesController:0x47052ac> app/controllers/articles_controller.rb:5:in `index' dan ini code...
doni
doni_kasep_p...
Online Now Send Email
Jun 24, 2009
7:16 am

udah di require 'paginate' lum mas di controllernya? klo saya sih pakenya will paginate, bisa paginate array collection juga. semoga bisa membantu. Regards, ...
Marcelino Ponty
kaosrobekrobek
Online Now Send Email
Jun 24, 2009
10:19 am

require nya di model apa di controller...? soalnya kalo di controller bakal muncul error cannot convert symbol to string.. kalo itu artinya apa ya?...
doni
doni_kasep_p...
Online Now Send Email
Jun 26, 2009
8:30 am

klo saya taruh di /config/environtment.rb terus... semoga membantu Rails::Initializer.run do |config| .... end Rails::Initializer.run do |config| config.gem...
i nengah august M
i_ngh
Offline Send Email
Jul 2, 2009
4:14 am

... setau saya kalo sudah di config.gem ga perlu require lagi (biar kodingnya bersih). kalo itu dihapus nggak mau to? -- be agile XOR break;...
arie
riyari3
Offline Send Email
Jul 3, 2009
7:00 am

td saya coba hilangin require "will_paginate" terus restart server bisa jalan juga. config.gem tuh mksdnya gmn pak?? ga ngerti nih... mklm masih pemula. ini...
i nengah august M
i_ngh
Offline Send Email
Jul 3, 2009
7:08 am

... gampangannya kalo yang di RTFM di http://apidock.com/rails/Rails/Initializer kalo di komputer saya disini ...
Arie Kusuma Atmaja
riyari3
Offline Send Email
Jul 3, 2009
12:56 pm

saya masih kurang paham ... setelah saya download gem nya trus gem itu di simpan di root mana? saya pake netbeans...
doni
doni_kasep_p...
Online Now Send Email
Jul 7, 2009
12:01 pm

... kalau pakai netbeans, ikuti petunjuk cara instalasi rubygem menurut netbeans. cari di google, pasti dapat tutorial cara nginstal rubygem pakai netbeans. ...
arie
riyari3
Offline Send Email
Jul 7, 2009
12:39 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help