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
| PG::Error: ERROR: relation "facilities" does not exist | |
| LINE 5: WHERE a.attrelid = '"facilities"'::regclass | |
| ^ | |
| : SELECT a.attname, format_type(a.atttypid, a.atttypmod), | |
| pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod | |
| FROM pg_attribute a LEFT JOIN pg_attrdef d | |
| ON a.attrelid = d.adrelid AND a.attnum = d.adnum | |
| WHERE a.attrelid = '"facilities"'::regclass | |
| AND a.attnum > 0 AND NOT a.attisdropped | |
| ORDER BY a.attnum |
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
| if full_name.size == 3 | |
| patient.update_attributes(first_name: full_name[0,1], last_name: full_name[2]) | |
| else | |
| patient.update_attributes(first_name: full_name[0], last_name: full_name[1]) | |
| 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
| def up | |
| patients = Patient.find(:all) | |
| patients.each do |patient| | |
| full_name = patient.name.split | |
| patient.update_attributes(first_name: full_name[0], last_name: full_name[1]) | |
| end | |
| end | |
| def down |
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
| patients = Patient.find(:all) | |
| patients.each do |patient| | |
| patient.name |
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
| <div class="outcome-section graph-container"> | |
| <h3 class="boxed-header">Overall Progress <%= records.last.integer_value %></h3> | |
| <h3 class="boxed-header">Goal <%= ogoal.goal %></h3> | |
| <div style="height:300px;" class="graph" data-scale="<%= ogoal.scale.min %>-<%= ogoal.scale.max %>" data-goal="<%= ogoal.goal %>" data-coordata="<%= records.to_a.map { |r| "#{r.progress_report.due_date.to_time.to_i*1000}|#{(r.integer_value)}" }.join(",") %>"> | |
| </div> | |
| </div> | |
| <div class="outcome-section graph-container"> | |
| <h3 class="boxed-header">Overall Progress <%= records.last.integer_value %></h3> |
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
| if goal | |
| plotData = [ | |
| { | |
| data: tracking | |
| lines: | |
| show: true | |
| lineWidth: 1 | |
| points: | |
| show: true | |
| radius: 3 |
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
| $ -> | |
| options = | |
| autoPlay: true | |
| autoPlayDelay: 6000 | |
| transitionThreshold: -100 | |
| startingFrameID: 1 | |
| nextButton: "#sequence .next" | |
| prevButton: "#sequence .prev" | |
| pauseOnHover: true |
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
| → rspec spec/ | |
| 1) School scopes#for_user ValEdAdmin should return the list of schools for the admin | |
| Failure/Error: School.for_user(user).should == [school_1, school_2] | |
| expected: [#<School id: 2358, district_id: 3016, name: "Test School", school_type: "public", created_at: "2012-08-13 18:54:16", updated_at: "2012-08-13 18:54:16", deleted_at: nil>, #<School id: 2359, district_id: 3017, name: "Test School", school_type: "public", created_at: "2012-08-13 18:54:17", updated_at: "2012-08-13 18:54:17", deleted_at: nil>] | |
| got: [#<School id: 2359, district_id: 3017, name: "Test School", school_type: "public", created_at: "2012-08-13 18:54:17", updated_at: "2012-08-13 18:54:17", deleted_at: nil>, #<School id: 2358, district_id: 3016, name: "Test School", school_type: "public", created_at: "2012-08-13 18:54:16", updated_at: "2012-08-13 18:54:16", deleted_at: nil>] (using ==) | |
| Diff: | |
| @@ -1,3 +1,2 @@ | |
| -[#<School id: 2358, district_id: 3016, name: "Test School", school_type: "publ |