Commit a444223af2ab9727becd162993bc33d815bb1f44
1 parent
65c80c91
Exists in
colab
and in
4 other branches
Added seeds for reading group attributes
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
db/seeds.rb
| ... | ... | @@ -24,3 +24,13 @@ kalibro_configurations.each do |configuration| |
| 24 | 24 | attributes.user_id = default_user.id |
| 25 | 25 | attributes.save |
| 26 | 26 | end |
| 27 | + | |
| 28 | +# The same restrictions apply to the default reading group | |
| 29 | +reading_groups = ReadingGroup.all | |
| 30 | +reading_groups.each do |reading_group| | |
| 31 | + attributes = ReadingGroupAttributes.new | |
| 32 | + attributes.reading_group_id = reading_group.id | |
| 33 | + attributes.user_id = default_user.id | |
| 34 | + attributes.public = true | |
| 35 | + attributes.save | |
| 36 | +end | ... | ... |