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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller namespace generator #17

Open
sam-kim opened this issue Dec 12, 2018 · 0 comments
Open

Controller namespace generator #17

sam-kim opened this issue Dec 12, 2018 · 0 comments
Labels

Comments

@sam-kim
Copy link

sam-kim commented Dec 12, 2018

Follow up to #16

Ran into this when generating a controller with a namespace, ex bin/rails g scaffold admin/projects. I ran into a small issue while working with the accessible_by_user and my workaround is creating a minor inconvenient 馃悰 .

Running the command will render:

  def index
    @admin_projects = Admin_project.accessible_by_user(current_user).all
  end

  ...

  def set_admin_project
    @admin_project = Admin_project.accessible_by_user(current_user).find(params[:id])
  end

While everything else on the controller is of this format:

  def new
    @admin_project = Admin::Project.new
  end
@sam-kim sam-kim added the bug label Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant