Cannot access 'humanized_money' in rails_admin #88

deiga opened this Issue Mar 11, 2013 · 4 comments


None yet
3 participants

deiga commented Mar 11, 2013


I assumed that the view helpers were available to mounted apps like rails_admin.

Is this is a problem of money-rails or rails_admin?


semmons99 commented Mar 11, 2013

@alup any ideas?


alup commented Mar 11, 2013

@deiga Could you provide some more information of how to reproduce this? Helpers should be available in every template after app initialization.

deiga commented Mar 13, 2013

Well I guess my problem is that I don't call on humanized_money in a view. (at least I think so)
It's situated in the rails_admin initializer where I want to define how to output the value.

config.model 'Shop::Order' do
    configure :price, :decimal do
      pretty_value do
        humanized_money value + ' €'

Not sure how that method call actually works, but I either get MethdoNotFound or just the visual representation of the Money object when opening the show in rails_admin...


alup commented Jun 26, 2013

Since the humanized_money is a helper method, it is only available in ::ActionView::Base context. I suppose this is the reason you are getting this error. You should check how rails_admin handles ActionView helpers inside the configuration initializer.

I am closing this as invalid for now.

alup closed this Jun 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment