I am developing an application using Rails 3.2 and ActiveAdmin 0.4.4. I have a model called Teaser (/app/models/teaser.rb):
class Teaser < ActiveRecord::Base attr_accessible :img, :name, :url validates :img, :name, :presence => true mount_uploader :img, TeaserUploader end
And I added ActiveAdmin to it (/app/admin/teaser.rb):
# encoding: UTF-8 ActiveAdmin.register Teaser do form do |f| f.inputs "Teaser" do f.input :name, :label => '' f.input :url, :label => '' f.input :img, :as => :file, :label => '' end f.buttons end end
Now, when I go to 'http: // localhost: 3000 / admin / teasers', I get the following error:
Mapping C: /RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activeadmin-0.4.4/app/views/active_admin/resource/index.html.arb where line # 1 is raised: Collection not is a paginated area. Set up collection.page (params [: page]). Per (10) before the call: paginated_collection.
I get the same error when testing my application on Linux (Ubuntu 12.04).
I can solve this problem this way (/app/admin/teaser.rb):
# encoding: UTF-8 ActiveAdmin.register Teaser, :as => 'Somename' do
But if I use this method, I cannot translate this model using /app/config/locales/XX.yml
All other models work correctly.
Ivan Larionov
source share