Groups
Groups
Sign in
Groups
Groups
RubyOnRails to russian
Conversations
About
Send feedback
Help
Получить имя модели у named_scope и collection
0 views
Skip to first unread message
Shumkov
unread,
Oct 9, 2008, 7:08:13 AM
10/9/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RubyOnRails to russian
Передаю в функцию либо класс модели либо named_scope, либо collection.
Как в последних двух случаях получить имя модели.
Пока есть только один вариант:
collection.first.class.name
Но хотелось бы без обращений к базе.
Reply all
Reply to author
Forward
0 new messages