Good idea.


On Thu, Mar 27, 2014 at 2:30 PM, Jon Seaberg <notifications@github.com>wrote:

> In db/fixtures/777_lp_community_settings.rb:
>
> > +    english_language_arts: { name: 'English Language Arts', color: '9EB83B', id: 104 },
> > +    health: { name: 'Health', color: '3AB54A', id: 105 },
> > +    homeschool: { name: 'Homeschool', color: '12A89D', id: 106 },
> > +    languages: { name: 'Languages', color: '25AAE2', id: 107 },
> > +    lifestyle: { name: 'Lifestyle', color: '0E76BD', id: 108 },
> > +    math: { name: 'Math', color: '652D90', id: 109 },
> > +    physical_education: { name: 'Physical Education', color: '92278F', id: 110 },
> > +    programs: { name: 'Programs', color: 'ED207B', id: 111 },
> > +    science: { name: 'Science', color: '25AAE1', id: 112 },
> > +    social_studies: { name: 'Social Studies', color: 'AB9364', id: 113 },
> > +    technology: { name: 'Technology', color: 'D2691E', id: 114 },
> > +    visual_performing_arts: { name: 'Visual & Performing Arts', color: '800080', id: 115 }
> > +}
> > +categories.values.each do |category|
> > +  unless Category.where(id: category[:id]).exists?
> > +    Category.create id: category[:id], name: category[:name], user_id: Discourse.system_user.id, color: category[:color], text_color: 'ffffff'
>
> Maybe find_or_initialize and save. So its easy to change values when we
> want.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/LessonPlanet/discourse/pull/15/files#r11045991>
> .
>



-- 

*Jason Rust*  Software Engineer

P 425.835.2541  *F *805.560.8455  *E* jason@lessonplanet.com

924 Anacapa Street | Suite 4i, Santa Barbara, CA 93101

<http://www.lessonplanet.com/?utm_source=signature&utm_medium=email&utm_content=bob&utm_campaign=everyday>

    <http://lessonplanet.com/us/social_redirect?network=facebook&utm_source=signature&utm_medium=email&utm_content=bob&utm_campaign=everyday>
  <http://lessonplanet.com/us/social_redirect?network=youtube&utm_source=signature&utm_medium=email&utm_content=bob&utm_campaign=everyday>
  <http://lessonplanet.com/us/social_redirect?network=googleplus&utm_source=signature&utm_medium=email&utm_content=bob&utm_campaign=everyday>
  <http://lessonplanet.com/us/social_redirect?network=youtube&utm_source=signature&utm_medium=email&utm_content=bob&utm_campaign=everyday>