Skip to content

Instantly share code, notes, and snippets.

@ziyan-junaideen
Last active August 3, 2018 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziyan-junaideen/db00083b65af82ff1858a05e456c9cbc to your computer and use it in GitHub Desktop.
Save ziyan-junaideen/db00083b65af82ff1858a05e456c9cbc to your computer and use it in GitHub Desktop.
I am trying to load a resource through cancancan. How ever they end up nil. Am I missing some thing?
class Management::Budgets::IdeasController < Management::BaseController
load_resource :budget
load_resource :investment, through: :budget, class: 'Budget::Investment'
def index
# @investments = nil
end
def new
# @investment = nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment