I am trying to use pagination helper inside a controller which is part
of a “module”, and also the model is within a “module” as well.
=== controller code fragment ===
@user_things_pages, @user_things = paginate :progresses,
:conditions => conditions,
…
=== Here are my active record models, grouped into modules ===
class Goals::UserController < Goals::BaseController
class Goals::Progress < ActiveRecord::Base
When trying to load the page, I get the following error below.
(But doing something like Progress.find(:all) seems to work just fine)
Is there something I am missing?
uninitialized constant Progress
RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
const_missing' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
const_missing’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
constantize' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in
constantize’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/pagination.rb:194:in
paginator_and_collection_for' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/pagination.rb:129:in
paginate’
#{RAILS_ROOT}/app/controllers/goals/user_controller.rb:31:in `view’