Hi,
  I don't use thor but I store tasks in lib/tasks/custom.rake
for instance and they are just normal rake tasks

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

On 14:02 Wed 30 Dec     , kristiannissen wrote:
> how do you include merb in thor tasks? In rails rake tasks we use
> something like
> 
> 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)
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "merb" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/merb?hl=en.
> 
> 

--

You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.


Reply via email to