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
{"1"=>[{"id"=>560167561, "grower_id"=>1026641359, "name"=>"Just a test"}, {"id"=>560167556, "grower_id"=>1026641357, "name"=>"Kettlesens"}, {"id"=>560167557, "grower_id"=>1026641357, "name"=>"Bill Cook"}, {"id"=>560167563, "grower_id"=>1026641359, "name"=>"A new far,"}, {"id"=>560167564, "grower_id"=>1026641359, "name"=>"A mother one"}, {"id"=>560167565, "grower_id"=>1026641359, "name"=>"a mother one"}, {"id"=>560167566, "grower_id"=>1026641359, "name"=>"TEST"}, {"id"=>560167567, "grower_id"=>1026641359, "name"=>"Something"}, {"id"=>560167568, "grower_id"=>1026641359, "name"=>"poop"}, {"id"=>560167560, "grower_id"=>1026641360, "name"=>"Mark Farms"}, {"id"=>560167562, "grower_id"=>1026641358, "name"=>"Another farm"}, {"id"=>560167558, "grower_id"=>1026641358, "name"=>"Dale Case"}, {"id"=>560167559, "grower_id"=>1026641359, "name"=>"Trent Farm"}]} |
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
{ | |
"data": | |
{ | |
"reports": | |
{ | |
"1": [ | |
{ | |
"id": 11984, | |
"staging": "V84", | |
"weather": "This should not be in created array", |
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
{ | |
"data": | |
{ | |
"reports": | |
{ | |
"1": [ | |
{ | |
"id": 11984, | |
"staging": "V84", | |
"weather": "This should not be in created array", |
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
{ | |
"data": | |
{ | |
"reports": | |
{ | |
"1": [ | |
{ | |
"id": 11984, | |
"staging": "V84", | |
"weather": "This should not be in created array", |
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
ActionModal = new Main.ActionModal | |
ActionModal.open( "#openSample", "#sampleModal"); | |
ActionModal.open( "#openStand", "#standModal"); | |
ActionModal.open( "#openRecommendation", "#recommendationModal" ); | |
ActionModal.close( "#closeRecommendation", "#recommendationModal"); | |
ActionModal.open( "#editReport", "#editReportModal"); | |
ActionModal.close( "#closeEditModal", "#editReportModal") | |
ActionModal.close( "#deleteReport", "#editModal"); | |
ActionModal.open( "#openYield", "#yieldModal") |
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
+ (void)uploadImages { | |
// create an array of image names that need to be uploaded | |
FMDatabase *db = [FMDatabase databaseWithPath:[[Sync shared] databasePath]]; | |
[db open]; | |
NSUInteger count = 0; | |
NSUInteger total = [db intForQuery:@"SELECT COUNT(*) FROM images WHERE uploads>0"]; | |
//NSLog(@"%ld records", total); | |
FMResultSet *results = [db executeQuery:@"SELECT * FROM images WHERE uploads>0"]; |
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 Admin < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
validates :key, format: {with: /\A#{ENV["admin_key"]}/} | |
def self.send_report_notification report | |
all.each do |a| |
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
require 'test_helper' | |
class Api::V1::Scout::SyncControllerTest < ActionController::TestCase | |
test "sync without an email returns error" do | |
get :get_sync, format: :json | |
assert_equal "Missing email header", response_body["message"] | |
end | |
test "sync with wrong email returns error and no timestamp or token" do |
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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
actionmailer (4.1.10) | |
actionpack (= 4.1.10) | |
actionview (= 4.1.10) | |
mail (~> 2.5, >= 2.5.4) | |
actionpack (4.1.10) | |
actionview (= 4.1.10) | |
activesupport (= 4.1.10) |
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
Rails.application.configure do | |
# Settings specified here will take precedence over those in config/application.rb. | |
# Code is not reloaded between requests. | |
config.cache_classes = true | |
# Eager load code on boot. This eager loads most of Rails and | |
# your application in memory, allowing both threaded web servers | |
# and those relying on copy on write to perform better. | |
# Rake tasks automatically ignore this option for performance. |