2016年5月21日土曜日

Ruby On Ralis : Active Admin for Rails5



https://github.com/activeadmin/activeadmin

$ vim Gemfile
gem 'activeadmin', github: 'activeadmin/activeadmin'
gem 'devise', github: 'plataformatec/devise'
gem 'kaminari',   github: 'amatsuda/kaminari', branch: '0-17-stable'


$ rails destroy devise:install
$ rails g active_admin:install

$ rails c
pry(main)> AdminUser.create!(:email => 'admin@example.com', :password => 'password', :password_confirmation => 'password')

$ rails db:migrate

$ rails generate active_admin:resource Twine

$ rails s

$ rails console -e production
pry(main)> AdminUser.create!(:email => 'admin@example.com', :password => 'password', :password_confirmation => 'password')

$ rails g active_admin:assets

$ vim config/initializers/kaminari.rb
Kaminari.configure do |config|
  config.page_method_name = :per_page_kaminari
end

0 件のコメント:

コメントを投稿

fd-find

 $ sudo apt install fd-find $ fdfind 石