Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b1edae008e
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (16 sloc) 0.609 kb
namespace :backtastic do
namespace :validations do
desc "Build put validation metadata in app/assets/javascripts"
task :build => :environment do
output = ENV["VALIDATIONS_FILE"] || Rails.root.join("app", "assets", "javascripts", "rails_validations.coffee")
Dir[Rails.root.join "app", "models", '**', '*.rb'].each do |file|
begin
require file
rescue
end
end
erb = ERB.new File.read(File.join(File.dirname(__FILE__), "..", "templates", "rails_validations.coffee.erb"))
File.open(output, "w") { |f| f.puts(erb.result) }
end
end
end
Jump to Line
Something went wrong with that request. Please try again.