I recently started working in rails admin, I'm getting this 500 error which occurs when i try to edit a model in Rails admin. Any help is appreciated.
config.model Order do
edit do
field :status do
label "Status"
end
end
end
TIA.
My model,
class Order < ActiveRecord::Base
belongs_to :customer, inverse_of: :orders
has_many :mmso
has_many :mmis, through: :mmso
has_one :hm, through: :mmi
has_one :pay
belongs_to :delivery, inverse_of: :orders
belongs_to :addr
Error Log for further understanding.
NoMethodError - undefined method `i18n_key' for nil:NilClass:
rails_admin (0.8.1) app/helpers/rails_admin/application_helper.rb:66:in `wording_for'
rails_admin (0.8.1) app/views/rails_admin/main/_form_nested_one.html.haml:7:in `__home_preethi__rbenv_versions_______lib_ruby_gems_______gems_rails_admin_______app_views_rails_admin_main__form_nested_one_html_haml___1061508105842580381_47125905871900'
actionview (4.2.4) lib/action_view/template.rb:145:in `block in render'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
actionview (4.2.4) lib/action_view/template.rb:333:in `instrument'
actionview (4.2.4) lib/action_view/template.rb:143:in `render'
actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.4) lib/active_support/notifications.rb:164:in `instrument'
actionview (4.2.4) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
actionview (4.2.4) lib/action_view/renderer/partial_renderer.rb:309:in `render'
actionview (4.2.4) lib/action_view/renderer/renderer.rb:47:in `render_partial'
actionview (4.2.4) lib/action_view/renderer/renderer.rb:21:in `render'
actionview (4.2.4) lib/action_view/helpers/rendering_helper.rb:32:in `render'
haml (4.0.7) lib/haml/helpers/action_view_mods.rb:10:in `block in render_with_haml'
haml (4.0.7) lib/haml/helpers.rb:89:in `non_haml'
haml (4.0.7) lib/haml/helpers/action_view_mods.rb:10:in `render_with_haml'
rails_admin (0.8.1) lib/rails_admin/config/fields/base.rb:220:in `block in <class:Base>'
rails_admin (0.8.1) lib/rails_admin/config/configurable.rb:66:in `block in register_instance_option'
rails_admin (0.8.1) lib/rails_admin/config/proxyable/proxy.rb:27:in `method_missing'
spring (1.6.2) lib/spring/client.rb:28:in `run'
spring (1.6.2) bin/spring:49:in `<top (required)>'
spring (1.6.2) lib/spring/binstub.rb:11:in `<top (required)>'
/home/preethi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
bin/spring:13:in `<top (required)>'
Aucun commentaire:
Enregistrer un commentaire