Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alias for rails model

My model name in one of rails app is OrganizationUser and is there any way to create alias name for this model as OU or OrgUser so that I can use in rails console..

like image 298
shajin Avatar asked Dec 27 '22 22:12

shajin


1 Answers

If kishie's answer does not suit you you could create another model that inherits from OrganizationUser:

class OU < OrganizationUser
end

or

class OrgUser < OrganizationUser
end
like image 165
pepe Avatar answered Jan 09 '23 23:01

pepe