lucasefe / themes_for_rails

Theme Support for Rails 3
This very same page :)
MIT License
308 stars 102 forks source link

seeding data from a specific theme #35

Closed joaomilho closed 13 years ago

joaomilho commented 13 years ago

Hi guys, I guess somthing like that would be useful...

namespace :db do namespace :seed do desc "Seeds a theme Usage: rake db:seed:theme THEME=your_theme" task :theme => :environment do |t, args| load(File.join(Rails.root, 'themes', ENV["THEME"], 'db', 'seed.rb')) end end end

lucasefe commented 13 years ago

Joao, hi!

I think this piece of code doesn't belong to this plugin. A theme only represent a part of the view that is changeable, but your rake task deals with data (model).

joaomilho commented 13 years ago

Yeah, I understand. But in my case a theme is a cliente, so I need to seed some example data that fits the client... I don't know if more people use it like that.