set administrator or moderator permissions to users in rail3 through the console
Sergey Shilov
sss at s-s-s.ru
Fri Jul 20 17:11:00 BST 2012
Thank you, Thom.
So works.
---
user.roles.create({:role => "administrator", :granter_id => 3}, :without_protection => true)
--
3 is display_name's id of user
Sergey.
Вы писали 20 июля 2012 г., 19:25:09:
TH> On 20/07/12 15:38, Sergey Shilov wrote:
>> How to give administrator or moderator permissions to users in rail3 through the console.
>> The rails2 commands do not work :(
TH> Oh I usually just use SQL for first admin.. You should be able to do it
TH> with this though:
TH> user.roles.create({:role => "administrator", :granter_id => 3},
TH> :without_protection => true)
TH> Tom
More information about the rails-dev
mailing list