【发布时间】:2016-01-02 16:13:55
【问题描述】:
我在使用 Active Admin 时遇到了两个大问题
当我去编辑用户时,加密密码不会显示,所以基本上我不得不破解我自己的网站并将另一个加密密码复制并粘贴到该字段中以更新用户 - 这与创建用户相同.
第二个问题是我无法创建新用户。当我去创建用户时,什么也没有发生。我没有收到错误。页面只是刷新,用户没有保存。
用户.rb
ActiveAdmin.register User do
controller do
def permitted_params
params.permit!
end
end
end
我尝试破坏我安装的活动管理员,然后我重新安装它并再次生成模型,但结果相同。我正在使用 Rails 4.2.1 和 Ruby 2.0.0。
gem 'activeadmin', github: 'activeadmin'
开发中.rb
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true
# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.
config.assets.raise_runtime_errors = true
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end
我尝试将 config.cache_classes = false 更改为 true,但这也不起作用。
我不确定在这里做什么。有什么建议么?我认为这是一个错误。希望它可以修复。谢谢。
【问题讨论】: