# פקודת Rails לקידום המוני של משתמשים ל-TL2?

**URL:** https://meta.discourse.org/t/rails-command-to-mass-promote-users-to-tl2/149238
**Category:** Development
**Tags:** rails-console
**Created:** [25 באפריל,‏ 2020,‏ 8:07am UTC](https://meta.discourse.org/t/rails-command-to-mass-promote-users-to-tl2/149238 "2020-04-25T08:07:07Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [25 באפריל,‏ 2020,‏ 9:43am UTC](https://meta.discourse.org/t/rails-command-to-mass-promote-users-to-tl2/149238/4 "2020-04-25T09:43:43Z")

</div>

There is an Howto to bulk move all the users from a lower TL to an higher level (and viceversa)

> [@Modify trust level for all users](https://meta.discourse.org/t/how-to-modify-trust-level-for-all-users/103628):
>
> Here’s an example of a [bulk operation](https://meta.discourse.org/t/administrative-bulk-operations/118349) to set the trust level to 2 for all users currently at trust level 0 or 1: This is slow, but properly triggers all side effects (group membership updates, badge grants, and logging). It may be preferred especially when you have fewer than 1000 users. Note: this does not skip users with manually locked trust levels — add .where(manual\_locked\_trust\_level: nil) to the query if you want to skip them. User.where(trust\_level: [0, 1]).find\_each do |user| user.…

---

_[View the full topic](https://meta.discourse.org/t/rails-command-to-mass-promote-users-to-tl2/149238)._
