Skip to content

Instantly share code, notes, and snippets.

View toniesteves's full-sized avatar

Toni Esteves toniesteves

View GitHub Profile
def create
@archive = Archive.new(archive_params)
@archive.receipt = 0;
options = {:col_sep => "\t", :row_sep => "\n"}
SmarterCSV.process(archive_params[:attachment].path,options) do |chunk|
chunk.each do |data_hash|
@archive.receipt += data_hash[:price]
Order.create!( data_hash )
end
app.controller('ModalCtrl', function ($scope, $http, ngDialog, Schedule,$controller) {
$scope.open = function (resourceObj,date) {
$scope.employee = resourceObj.title;
$scope.date = new Date(date);
$scope.time = new Date(date);
ngDialog.open({
template: '/assets/angular/views/modal',
controller: 'ScheduleCtrl',