This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# user.rb | |
class User < ActiveRecord::Base | |
scope :regular_users, where(:admin => false, :can_admin_project => false) | |
belongs_to :project | |
has_many :uploaded_files | |
has_many :vehicles | |
after_create :send_registration_email |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
columns: | |
[{ | |
field:"PriceField", | |
title:"Price", | |
width:80, | |
template: "<div class='foobar'>#= kendo.format('{0:c}', kendo.parseInt(PriceField)) #</div>" | |
}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22:45:52 faye.1 | 127.0.0.1 - - [26/Mar/2012 22:45:52] "GET /?message=%5B%7B%22channel%22%3A%22%2Fmeta%2Fhandshake%22%2C%22version%22%3A%221.0%22%2C%22supportedConnectionTypes%22%3A%5B%22callback-polling%22%5D%2C%22id%22%3A%221%22%7D%5D&jsonp=__jsonp2__ HTTP/1.1" 404 - 0.0212 | |
22:46:38 faye.1 | 127.0.0.1 - - [26/Mar/2012 22:46:38] "GET /?message=%5B%7B%22channel%22%3A%22%2Fmeta%2Fhandshake%22%2C%22version%22%3A%221.0%22%2C%22supportedConnectionTypes%22%3A%5B%22callback-polling%22%5D%2C%22id%22%3A%221%22%7D%5D&jsonp=__jsonp1__ HTTP/1.1" 404 - 0.0006 | |
22:46:48 poller.1 | Repository Load (2.0ms) SELECT "repositories".* FROM "repositories" WHERE "repositories"."id" = $1 LIMIT 1 [["id", "2"]] | |
22:46:48 poller.1 | User Load (38.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]] | |
22:46:48 poller.1 | Repository Load (0.6ms) SELECT "repositories".* FROM "repositories" WHERE "repositories"."id" = $1 LIMIT 1 [["id", "2"]] | |
22:46:48 poller.1 | Success: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started POST "/upload" for 127.0.0.1 at 2012-03-26 21:45:15 +0200 | |
RailsDevTweaks: Skipping ActionDispatch::Reloader hooks for this request. | |
Processing by UploadsController#upload as JSON | |
Parameters: {"hashes"=>"[-1732159597,-1130529528,1310174254,615246437]", "files"=>[#<ActionDispatch::Http::UploadedFile:0x0000012a4dcaa8 @original_filename="ApatiskaKvitto.pdf", @content_type="application/pdf", @headers="Content-Disposition: form-data; name=\"files[]\"; filename=\"ApatiskaKvitto.pdf\"\r\nContent-Type: application/pdf\r\n", @tempfile=#<File:/var/folders/cx/vtstdwkd37g97t2r24zkyrkr0000gn/T/RackMultipart20120326-1710-heqmg7>>, #<ActionDispatch::Http::UploadedFile:0x0000012a4dca30 @original_filename="Bild008.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"files[]\"; filename=\"Bild008.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/var/folders/cx/vtstdwkd37g97t2r24zkyrkr0000gn/T/RackMultipart20120326-1710-1d4yvzs>>, #<ActionDispatch::Http::UploadedFile:0x0000012a4dc9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Failures: | |
1) Examiner relations should have a list of submissions | |
Failure/Error: Unable to find matching line from backtrace | |
SystemStackError: | |
stack level too deep | |
# /Users/jesper/.rvm/gems/ruby-1.9.2-p180/gems/factory_girl-2.6.3/lib/factory_girl/evaluator_class_definer.rb:29 | |
2) AssistantRegisteredToGivenCourse relations should have a lab group | |
Failure/Error: Unable to find matching line from backtrace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Projektförslag: | |
1. Haikuappen | |
Haikuappen tar in en textsnutt och bedömer om det är en haiku. Någonslags poängsystem ska utvecklas för att ge haikun poäng. | |
Poängen kan till exempel åsyfta hur "nära" texten är en haiku. | |
För att avgöra om texten är en haiku måste vi använda en algoritm som räknar stavelser. Dessa algoritmer är olika för olika språk. | |
Antingen utvecklar vi en egen för bara svenska eller så försöker vi hitta en lämpligt befintligt bibliotek. | |
Man skulle kunna sig t.ex. twitter-integrering - appen kan kolla om dina tweets är haikudikter. | |
2. Chinese Checkers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
factory :assistant do | |
user | |
given_courses { [Factory.create(:given_course)] } | |
lab_groups { [Factory.create(:lab_group)] } | |
all_lab_groups { [Factory.create(:lab_group)] } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Failures: | |
1) Lab relations should have a list of submissions | |
Failure/Error: build(:lab, submissions: [create(:submission)]).should have(1).submissions | |
NoMethodError: | |
undefined method `given_course' for nil:NilClass | |
# ./app/models/lab_has_group.rb:16:in `given_courses_match' | |
# ./spec/models/lab_spec.rb:71:in `block (3 levels) in <top (required)>' | |
2) Lab relations should have a list of lab_has_groups |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
factory :lab_has_group do | |
repository | |
lab do |lhg| | |
Factory.create(:lab) | |
end | |
lab_group do |lhg| | |
Factory.create(:lab_group, given_course: lhg.lab.given_course) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
factory :lab_has_group do | |
repository | |
lab | |
lab_group { Factory.create(:lab_group, given_course: lab.given_course) } | |
end |