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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Chart.js Redraw Example</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="chart.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
window.chartOptions = { | |
segmentShowStroke: false, |
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
@implementation MyAppDelegate | |
- (void) setUpDataMappingForObjectManager: (RKObjectManager*) objectManager | |
{ | |
// Workouts | |
RKManagedObjectMapping* workoutMapping = [RKManagedObjectMapping mappingForClass: [Workout class]]; | |
workoutMapping.primaryKeyAttribute = @"workoutID"; | |
[workoutMapping mapKeyPath: @"id" toAttribute: @"workoutID"]; |
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
class ActiveRecord::Base | |
def self.required_columns | |
self.columns.reject { |column| column.null } | |
end | |
def self.required_column_names | |
self.required_columns.map { |column| column.name } | |
end | |
end |