what can i do if super admin user id is deleted by admin only

34 views
Skip to first unread message

Sailatha K.

unread,
Feb 26, 2015, 1:43:54 AM2/26/15
to rubyonra...@googlegroups.com
our site admin deleted his own id while deleting users ,what can i do
now to get back admin user can any one help,its urgent.

--
Posted via http://www.ruby-forum.com/.

ankit c

unread,
Feb 26, 2015, 1:53:16 AM2/26/15
to rubyonra...@googlegroups.com
create new admin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/12a1a0d326d1d0ba9ae17c936129fbeb%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

ankit c

unread,
Feb 26, 2015, 1:55:31 AM2/26/15
to rubyonra...@googlegroups.com
using rails console create new admin.. for instance, if you are having user model having role admin.. you can create like
User.create(:email => "ad...@admin.com", :username => "admin", :password => "12345678", :password_confirmation => "12345678", :admin => true)..

I hope this will help

On Thu, Feb 26, 2015 at 12:11 PM, Sailatha K. <li...@ruby-forum.com> wrote:

ankit c

unread,
Feb 26, 2015, 1:55:49 AM2/26/15
to rubyonra...@googlegroups.com
using rails console create new admin.. for instance, if you are having user model having role admin.. you can create like
User.create(:email => "ad...@admin.com", :username => "admin", :password => "12345678", :password_confirmation => "12345678", :admin => true)..

I hope this will help

Sailatha K.

unread,
Feb 26, 2015, 2:10:34 AM2/26/15
to rubyonra...@googlegroups.com
ankit c wrote in post #1168678:
> using rails console create new admin.. for instance, if you are having
> user
> model having role admin.. you can create like
> User.create(:email => "ad...@admin.com", :username => "admin", :password
> =>
> "12345678", :password_confirmation => "12345678", :admin => true)..
>
> I hope this will help
>
> On Thursday, February 26, 2015 at 12:13:54 PM UTC+5:30, Ruby-Forum.com
> User

okay thank you ,i will try this.

Colin Law

unread,
Feb 26, 2015, 3:31:53 AM2/26/15
to rubyonra...@googlegroups.com
On 26 February 2015 at 06:54, ankit c <rubyr...@gmail.com> wrote:
> using rails console create new admin.. for instance, if you are having user
> model having role admin.. you can create like
> User.create(:email => "ad...@admin.com", :username => "admin", :password =>
> "12345678", :password_confirmation => "12345678", :admin => true)..

The exact details will, of course, depend on exactly what fields you
have in your users table.
Having done that improve the code so that a user cannot delete either
himself or the last admin user.

Colin

>
> I hope this will help
>
> On Thu, Feb 26, 2015 at 12:11 PM, Sailatha K. <li...@ruby-forum.com> wrote:
>>
>> our site admin deleted his own id while deleting users ,what can i do
>> now to get back admin user can any one help,its urgent.
>>
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to rubyonrails-ta...@googlegroups.com.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/rubyonrails-talk/12a1a0d326d1d0ba9ae17c936129fbeb%40ruby-forum.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CAB35-J63cs9FihR1Xsz-WK%2B0_RcNzFp3ZyNNkdA5vjNxJMUDzQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages