task :import_assets => :environment do
which makes it possible to load models inside tasks, but how is this
done using thor and merb?
desc 'booh', 'test datamapper'
def booh
Location.new
end
the line above gives me something like:
wikipedia.thor:8:in `booh': uninitialized constant
Thor::Sandbox::Wikipedia::Location (NameError)
example:
task :add_topic_shit => :merb_env do
Topic.all.each do |topic|
tagz = topic.tags.collect do |tag| tag.title end
topic.keywords = tagz.join(", ")
topic.save
end
end
> --
>
> You received this message because you are subscribed to the Google Groups "merb" group.
> To post to this group, send email to me...@googlegroups.com.
> To unsubscribe from this group, send email to merb+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/merb?hl=en.
>
>