add friendly_id gem and begin working on friendly ids for galleries
check to be sure flag state is valid before saving
fix for REV-629