Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jbuilder X rails-api #210

Open
SunnyTam opened this issue Dec 25, 2015 · 0 comments
Open

jbuilder X rails-api #210

SunnyTam opened this issue Dec 25, 2015 · 0 comments

Comments

@SunnyTam
Copy link

can anyone help? I have set a helper method on ApplicationHelper and try to make it work on rails-api X jbuilder. However, it shows
undefined local variable or method current_user_detail'`

this is my ApplicationHelper

module ApplicationHelper
  def current_user_detail
    User.find(current_user.id).user_detail if user_signed_in?
  end
end

this is my Application controller

class ApplicationController <ActionController::API
  include ActionController::ImplicitRender
  include ActionController::Helpers

can someone help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant