Sha256: 3dd44baf0e9c33c99773867dca173a0c09bcefcf284f3d46bf21442271702968
Contents?: true
Size: 494 Bytes
Versions: 26
Compression:
Stored size: 494 Bytes
Contents
# coding: UTF-8 require 'rake' require 'erb' namespace :dad do namespace :generate do task :routes do ARGV[1..-1].each do |arg| unless arg.index('=') task arg.to_sym do ; end @app_name ||= arg end end template = File.join(File.dirname(__FILE__), 'templates', 'routes.rb.erb') routes_file = "#{Rails.root}/config/routes.rb" File.write(routes_file, ERB.new(File.read(template)).result) end end end
Version data entries
26 entries across 26 versions & 1 rubygems