-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Change the model name #56
Comments
Yes, you can rename the tables and then update the Rodauth configuration to reference new table names: configure do
accounts_table :users
reset_password_table :user_password_reset_keys
remember_table :user_remember_keys
# ...
end To do it for all Rodauth tables, you can use this code: configure do
methods.grep(/_table$/) do |table_method|
public_send(table_method) { super().to_s.sub('account', 'user').to_sym }
end
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to rename the model to User instead of Account?
I'm building a banking app that has a table called accounts to store users' bank account details. I don't want to change the table name to something else, because it can be misleading to developers.
The text was updated successfully, but these errors were encountered: