【发布时间】:2014-12-10 14:37:29
【问题描述】:
第一次使用active-admin。我只是按照railscast的教程。在我安装了 active-admin 和一些配置之后,导航到“localhost:3000/admin”.. 我遇到了一些错误。
这是错误。
ArgumentError in ActiveAdmin::Devise::Sessions#new
Showing /home/eebasadre20/.rvm/gems/ruby-2.1.2/bundler/gems/active_admin-fc1874f7d3b4/app/views/active_admin/devise/sessions/new.html.erb where line #5 raised:
wrong number of arguments (3 for 2)**strong text**
我不知道视图的位置。在我的视图文件夹中,只有 layouts 文件夹存在。
<h2><%= render_or_call_method_or_proc_on(self, active_admin_application.site_title) %> <%= title t('active_admin.devise.login.title') %></h2>
<% scope = Devise::Mapping.find_scope!(resource_name) %>
<%= active_admin_form_for(resource, as: resource_name, url: send(:"#{scope}_session_path"), html: { id: "session_new" }) do |f|
f.inputs do
resource.class.authentication_keys.each_with_index { |key, index|
f.input key, label: t('active_admin.devise.'+key.to_s+'.title'), input_html: { autofocus: index.zero? }
谢谢!
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-4 gem activeadmin