This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Code binds to LDAP, searches users, returns multi-dimensional array for groups like so. | |
## Each element in the array represents a given users AD groups | |
## user_groups = [ [group1,group2], [group2,group3], [group2,group4] ] | |
My goal here is to get the common groups among all of the arrays and the only way I've found so far is this: | |
user_groups[0] & user_groups[1] & user_groups[2] | |
=> [group2] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateReleaseSteps < ActiveRecord::Migration[5.0] | |
def change | |
create_table :release_steps do |t| | |
t.belongs_to :release, index: true | |
t.string :name | |
t.string :loadbalancer | |
t.string :comment | |
t.integer :release_id | |
end | |
end |