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

Create a RoleStory class or module #94

Open
crawfoal opened this issue Sep 18, 2016 · 0 comments
Open

Create a RoleStory class or module #94

crawfoal opened this issue Sep 18, 2016 · 0 comments

Comments

@crawfoal
Copy link
Owner

  • hold information about the role story models and tables (basically all of the role story and role name related stuff that is currently in the Employment model)
  • have a method for_user that behaves like an ActiveRecord scope, returning all role stories for a particular user (something like SetterStory.where(user: user).or(ManagerStory.where(user: user) only with metaprogramming so that all types of role stories are handled; maybe define a for_user method for each role story model in the Employable concern

Might be tempting to call it RoleStories because it contains information about all of the role story models, however if we call it RoleStory, then calls to the method above will look kind of like regular ActiveRecord stuff.

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