├── workbook ├── .gitignore └── assets │ ├── images │ ├── books.png │ ├── goal.png │ ├── goals.png │ ├── ipad.png │ ├── iphone.png │ ├── login.png │ ├── add-goal.png │ ├── scaffold.png │ ├── edit-goal.png │ ├── table-crud.png │ ├── deleting-rows.png │ ├── authentication.png │ ├── basic-table-view.png │ ├── fetching-goals.png │ ├── final-iphone-app.png │ ├── nested-resources.png │ ├── pragmatic-studio.png │ ├── table-crud-remote.png │ ├── basic-table-view-delete.png │ └── table-crud-remote-async.png │ ├── ui │ └── default │ │ ├── blank.gif │ │ ├── bodybg.gif │ │ ├── opera.css │ │ ├── slides.css │ │ ├── s5-core.css │ │ ├── outline.css │ │ ├── print.css │ │ └── framing.css │ └── syntaxhighlighter │ ├── styles │ ├── help.png │ ├── printer.png │ ├── magnifier.png │ ├── page_white_code.png │ └── page_white_copy.png │ └── scripts │ └── clipboard.swf ├── code ├── rails_app │ ├── lib │ │ └── tasks │ │ │ ├── .gitkeep │ │ │ └── rcov.rake │ ├── public │ │ ├── favicon.ico │ │ ├── stylesheets │ │ │ └── .gitkeep │ │ ├── images │ │ │ ├── rails.png │ │ │ └── video.png │ │ ├── javascripts │ │ │ └── application.js │ │ ├── robots.txt │ │ ├── 422.html │ │ ├── 404.html │ │ └── 500.html │ ├── vendor │ │ └── plugins │ │ │ └── .gitkeep │ ├── app │ │ ├── helpers │ │ │ ├── application_helper.rb │ │ │ ├── goals_helper.rb │ │ │ ├── error_messages_helper.rb │ │ │ └── layout_helper.rb │ │ ├── views │ │ │ ├── goals │ │ │ │ ├── new.html.erb │ │ │ │ ├── edit.html.erb │ │ │ │ ├── _form.html.erb │ │ │ │ ├── _summary.html.erb │ │ │ │ ├── _credits.html.erb │ │ │ │ ├── index.html.erb │ │ │ │ └── show.html.erb │ │ │ ├── credits │ │ │ │ ├── new.html.erb │ │ │ │ ├── edit.html.erb │ │ │ │ ├── index.html.erb │ │ │ │ ├── _form.html.erb │ │ │ │ ├── create.js.rjs │ │ │ │ └── show.html.erb │ │ │ ├── sessions │ │ │ │ └── new.html.erb │ │ │ ├── users │ │ │ │ └── new.html.erb │ │ │ └── layouts │ │ │ │ └── application.html.erb │ │ ├── controllers │ │ │ ├── info_controller.rb │ │ │ ├── users_controller.rb │ │ │ ├── application_controller.rb │ │ │ └── sessions_controller.rb │ │ └── models │ │ │ ├── credit.rb │ │ │ └── goal.rb │ ├── config │ │ ├── initializers │ │ │ ├── json.rb │ │ │ ├── mime_types.rb │ │ │ ├── form_errors.rb │ │ │ ├── inflections.rb │ │ │ ├── session_store.rb │ │ │ ├── backtrace_silencers.rb │ │ │ └── secret_token.rb │ │ ├── environment.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── boot.rb │ │ ├── routes.rb │ │ ├── database.yml │ │ └── environments │ │ │ └── development.rb │ ├── .gitignore │ ├── test │ │ ├── fixtures │ │ │ ├── credits.yml │ │ │ ├── goals.yml │ │ │ └── users.yml │ │ └── performance │ │ │ └── browsing_test.rb │ ├── coverage.data │ ├── config.ru │ ├── coverage │ │ └── print.css │ ├── doc │ │ └── README_FOR_APP │ ├── Rakefile │ ├── script │ │ └── rails │ ├── db │ │ └── migrate │ │ │ ├── 20100504141007_create_goals.rb │ │ │ ├── 20100504141557_create_credits.rb │ │ │ └── 20100504170848_create_users.rb │ ├── services │ │ └── ar_client.rb │ └── Gemfile ├── iphone_app │ ├── Classes │ │ ├── .gitignore │ │ ├── Session.m │ │ ├── Session.h │ │ ├── GoalsViewController.h │ │ ├── SaveUpAppDelegate.h │ │ ├── GoalAddViewController.h │ │ ├── AuthenticationViewController.h │ │ ├── CreditDetailViewController.h │ │ ├── GoalDetailViewController.h │ │ ├── Goal.h │ │ ├── Credit.h │ │ ├── User.h │ │ ├── Goal.m │ │ └── AppHelpers.h │ ├── icon.png │ ├── .gitignore │ ├── objectiveresource │ │ ├── Classes │ │ │ ├── lib │ │ │ │ ├── objective_support │ │ │ │ │ └── Classes │ │ │ │ │ │ └── lib │ │ │ │ │ │ ├── Serialization │ │ │ │ │ │ ├── JSON │ │ │ │ │ │ │ ├── JSONSerializableSupport.h │ │ │ │ │ │ │ ├── NSDictionary+JSONSerializableSupport.h │ │ │ │ │ │ │ ├── NSArray+JSONSerializableSupport.h │ │ │ │ │ │ │ ├── NSObject+JSONSerializableSupport.h │ │ │ │ │ │ │ ├── NSArray+JSONSerializableSupport.m │ │ │ │ │ │ │ └── NSDictionary+JSONSerializableSupport.m │ │ │ │ │ │ ├── Serialize.h │ │ │ │ │ │ ├── XML │ │ │ │ │ │ │ ├── NSNull+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSNumber+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSArray+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSNull+XMLSerializableSupport.m │ │ │ │ │ │ │ ├── NSDate+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSString+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSDictionary+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSNumber+XMLSerializableSupport.m │ │ │ │ │ │ │ └── NSArray+XMLSerializableSupport.m │ │ │ │ │ │ ├── NSObject+Serialize.h │ │ │ │ │ │ ├── NSDate+Serialize.h │ │ │ │ │ │ ├── NSString+Serialize.h │ │ │ │ │ │ ├── NSString+Serialize.m │ │ │ │ │ │ ├── NSDictionary+KeyTranslation.h │ │ │ │ │ │ ├── NSObject+Serialize.m │ │ │ │ │ │ ├── NSDictionary+KeyTranslation.m │ │ │ │ │ │ └── NSDate+Serialize.m │ │ │ │ │ │ ├── Core │ │ │ │ │ │ ├── CoreSupport.h │ │ │ │ │ │ ├── ObjectiveSupport.h │ │ │ │ │ │ ├── NSData+Additions.h │ │ │ │ │ │ ├── NSString+GSub.h │ │ │ │ │ │ ├── NSString+GSub.m │ │ │ │ │ │ ├── ObjectiveResourceDateFormatter.h │ │ │ │ │ │ ├── NSObject+PropertySupport.h │ │ │ │ │ │ └── Inflections │ │ │ │ │ │ │ └── NSString+InflectionSupport.h │ │ │ │ │ │ └── json-framework │ │ │ │ │ │ └── JSONFramework.h │ │ │ │ ├── ObjectiveResource.h │ │ │ │ ├── NSMutableURLRequest+ResponseType.h │ │ │ │ ├── NSHTTPURLResponse+Error.h │ │ │ │ ├── ConnectionManager.h │ │ │ │ ├── ConnectionDelegate.h │ │ │ │ ├── Connection.h │ │ │ │ ├── Response.h │ │ │ │ └── ObjectiveResourceConfig.h │ │ │ ├── NSError+Error.h │ │ │ └── NSError+Error.m │ │ └── LICENSE │ ├── main.m │ ├── SaveUp_Prefix.pch │ ├── README.md │ └── Info.plist ├── 5-httpriot │ ├── HTTPRiot │ │ ├── HTTPRiot_Prefix.pch │ │ ├── Vendor │ │ │ ├── KissXML │ │ │ │ ├── DDXML.h │ │ │ │ ├── NSStringAdditions.h │ │ │ │ ├── NSStringAdditions.m │ │ │ │ └── DDXMLElementAdditions.h │ │ │ ├── AIXMLSerialization │ │ │ │ ├── AIXMLDocumentSerialize.h │ │ │ │ └── AIXMLDocumentSerialize.m │ │ │ └── JSON │ │ │ │ └── CREDITS │ │ ├── Extensions │ │ │ ├── NSDictionary+ParamUtils.h │ │ │ ├── NSString+EscapingUtils.h │ │ │ ├── NSObject+InvocationUtils.h │ │ │ ├── NSString+EscapingUtils.m │ │ │ └── NSDictionary+ParamUtils.m │ │ ├── Formatters │ │ │ ├── HRFormatXML.h │ │ │ ├── HRFormatJSON.h │ │ │ └── HRFormatXML.m │ │ ├── Utilities │ │ │ └── HRBase64.h │ │ ├── HROperationQueue.h │ │ ├── HROperationQueue.m │ │ ├── HRGlobal.m │ │ └── LICENSE │ ├── icon.png │ ├── README.md │ ├── .gitignore │ ├── main.m │ ├── Classes │ │ ├── AppHelpers.h │ │ ├── SaveUpAppDelegate.h │ │ ├── GoalsViewController.h │ │ ├── GoalDetailViewController.h │ │ ├── Goal.h │ │ ├── GoalAddViewController.h │ │ └── SaveUpAppDelegate.m │ ├── SaveUp_Prefix.pch │ └── SaveUp-Info.plist ├── 2-json │ ├── icon.png │ ├── .gitignore │ ├── Classes │ │ ├── GoalsViewController.h │ │ ├── SaveUpAppDelegate.h │ │ ├── Goal.h │ │ └── SaveUpAppDelegate.m │ ├── main.m │ ├── SaveUp_Prefix.pch │ ├── README.md │ └── SaveUp-Info.plist ├── 4-crud │ ├── icon.png │ ├── .gitignore │ ├── README.md │ ├── main.m │ ├── Classes │ │ ├── GoalsViewController.h │ │ ├── AppHelpers.h │ │ ├── Resource.h │ │ ├── SaveUpAppDelegate.h │ │ ├── GoalDetailViewController.h │ │ ├── Goal.h │ │ ├── GoalAddViewController.h │ │ └── SaveUpAppDelegate.m │ ├── SaveUp_Prefix.pch │ └── SaveUp-Info.plist ├── 1-bootstrap │ ├── icon.png │ ├── README.md │ ├── .gitignore │ ├── Classes │ │ ├── GoalsViewController.h │ │ ├── SaveUpAppDelegate.h │ │ └── SaveUpAppDelegate.m │ ├── main.m │ ├── SaveUp_Prefix.pch │ └── SaveUp-Info.plist ├── 3-scaffold │ ├── icon.png │ ├── .gitignore │ ├── README.md │ ├── main.m │ ├── Classes │ │ ├── GoalsViewController.h │ │ ├── AppHelpers.h │ │ ├── Resource.h │ │ ├── SaveUpAppDelegate.h │ │ ├── GoalDetailViewController.h │ │ ├── Goal.h │ │ ├── GoalAddViewController.h │ │ └── SaveUpAppDelegate.m │ ├── SaveUp_Prefix.pch │ └── SaveUp-Info.plist ├── 6-objectiveresource │ ├── icon.png │ ├── README.md │ ├── .gitignore │ ├── objectiveresource │ │ ├── Classes │ │ │ ├── lib │ │ │ │ ├── objective_support │ │ │ │ │ └── Classes │ │ │ │ │ │ └── lib │ │ │ │ │ │ ├── Serialization │ │ │ │ │ │ ├── JSON │ │ │ │ │ │ │ ├── JSONSerializableSupport.h │ │ │ │ │ │ │ ├── NSDictionary+JSONSerializableSupport.h │ │ │ │ │ │ │ ├── NSArray+JSONSerializableSupport.h │ │ │ │ │ │ │ ├── NSObject+JSONSerializableSupport.h │ │ │ │ │ │ │ ├── NSArray+JSONSerializableSupport.m │ │ │ │ │ │ │ └── NSDictionary+JSONSerializableSupport.m │ │ │ │ │ │ ├── Serialize.h │ │ │ │ │ │ ├── XML │ │ │ │ │ │ │ ├── NSNull+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSNumber+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSArray+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSNull+XMLSerializableSupport.m │ │ │ │ │ │ │ ├── NSDate+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSString+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSDictionary+XMLSerializableSupport.h │ │ │ │ │ │ │ ├── NSNumber+XMLSerializableSupport.m │ │ │ │ │ │ │ └── NSArray+XMLSerializableSupport.m │ │ │ │ │ │ ├── NSObject+Serialize.h │ │ │ │ │ │ ├── NSDate+Serialize.h │ │ │ │ │ │ ├── NSString+Serialize.h │ │ │ │ │ │ ├── NSString+Serialize.m │ │ │ │ │ │ ├── NSDictionary+KeyTranslation.h │ │ │ │ │ │ ├── NSObject+Serialize.m │ │ │ │ │ │ ├── NSDictionary+KeyTranslation.m │ │ │ │ │ │ └── NSDate+Serialize.m │ │ │ │ │ │ ├── json-framework │ │ │ │ │ │ └── JSONFramework.h │ │ │ │ │ │ └── Core │ │ │ │ │ │ ├── CoreSupport.h │ │ │ │ │ │ ├── ObjectiveSupport.h │ │ │ │ │ │ ├── NSData+Additions.h │ │ │ │ │ │ ├── NSString+GSub.h │ │ │ │ │ │ ├── NSString+GSub.m │ │ │ │ │ │ ├── ObjectiveResourceDateFormatter.h │ │ │ │ │ │ ├── NSObject+PropertySupport.h │ │ │ │ │ │ └── Inflections │ │ │ │ │ │ └── NSString+InflectionSupport.h │ │ │ │ ├── ObjectiveResource.h │ │ │ │ ├── NSMutableURLRequest+ResponseType.h │ │ │ │ ├── NSHTTPURLResponse+Error.h │ │ │ │ ├── ConnectionManager.h │ │ │ │ ├── ConnectionDelegate.h │ │ │ │ ├── Connection.h │ │ │ │ ├── Response.h │ │ │ │ └── ObjectiveResourceConfig.h │ │ │ ├── NSError+Error.h │ │ │ └── NSError+Error.m │ │ └── LICENSE │ ├── main.m │ ├── Classes │ │ ├── GoalsViewController.h │ │ ├── AppHelpers.h │ │ ├── SaveUpAppDelegate.h │ │ ├── Goal.m │ │ ├── Goal.h │ │ ├── GoalDetailViewController.h │ │ ├── GoalAddViewController.h │ │ └── SaveUpAppDelegate.m │ ├── SaveUp_Prefix.pch │ └── SaveUp-Info.plist └── staged │ └── objectiveresource │ ├── Classes │ ├── lib │ │ ├── objective_support │ │ │ └── Classes │ │ │ │ └── lib │ │ │ │ ├── Serialization │ │ │ │ ├── JSON │ │ │ │ │ ├── JSONSerializableSupport.h │ │ │ │ │ ├── NSDictionary+JSONSerializableSupport.h │ │ │ │ │ ├── NSArray+JSONSerializableSupport.h │ │ │ │ │ ├── NSObject+JSONSerializableSupport.h │ │ │ │ │ ├── NSArray+JSONSerializableSupport.m │ │ │ │ │ └── NSDictionary+JSONSerializableSupport.m │ │ │ │ ├── Serialize.h │ │ │ │ ├── XML │ │ │ │ │ ├── NSNull+XMLSerializableSupport.h │ │ │ │ │ ├── NSNumber+XMLSerializableSupport.h │ │ │ │ │ ├── NSArray+XMLSerializableSupport.h │ │ │ │ │ ├── NSNull+XMLSerializableSupport.m │ │ │ │ │ ├── NSDate+XMLSerializableSupport.h │ │ │ │ │ ├── XMLSerializableSupport.h │ │ │ │ │ ├── NSString+XMLSerializableSupport.h │ │ │ │ │ ├── NSDictionary+XMLSerializableSupport.h │ │ │ │ │ ├── NSNumber+XMLSerializableSupport.m │ │ │ │ │ └── NSArray+XMLSerializableSupport.m │ │ │ │ ├── NSDate+Serialize.h │ │ │ │ ├── NSObject+Serialize.h │ │ │ │ ├── NSString+Serialize.h │ │ │ │ ├── NSString+Serialize.m │ │ │ │ ├── NSDictionary+KeyTranslation.h │ │ │ │ ├── NSObject+Serialize.m │ │ │ │ ├── NSDictionary+KeyTranslation.m │ │ │ │ └── NSDate+Serialize.m │ │ │ │ ├── Core │ │ │ │ ├── CoreSupport.h │ │ │ │ ├── ObjectiveSupport.h │ │ │ │ ├── NSData+Additions.h │ │ │ │ ├── NSString+GSub.h │ │ │ │ ├── NSString+GSub.m │ │ │ │ ├── ObjectiveResourceDateFormatter.h │ │ │ │ ├── NSObject+PropertySupport.h │ │ │ │ └── Inflections │ │ │ │ │ └── NSString+InflectionSupport.h │ │ │ │ └── json-framework │ │ │ │ └── JSONFramework.h │ │ ├── ObjectiveResource.h │ │ ├── NSMutableURLRequest+ResponseType.h │ │ ├── NSHTTPURLResponse+Error.h │ │ ├── ConnectionManager.h │ │ ├── ConnectionDelegate.h │ │ ├── Connection.h │ │ ├── Response.h │ │ ├── ObjectiveResourceConfig.h │ │ └── NSMutableURLRequest+ResponseType.m │ ├── NSError+Error.h │ └── NSError+Error.m │ └── LICENSE └── screenshots └── iphone-app.png /workbook/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /code/rails_app/lib/tasks/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /code/rails_app/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /code/iphone_app/Classes/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /code/rails_app/vendor/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /code/rails_app/public/stylesheets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /code/5-httpriot/HTTPRiot/HTTPRiot_Prefix.pch: -------------------------------------------------------------------------------- 1 | #import "HRGlobal.h" -------------------------------------------------------------------------------- /code/rails_app/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end -------------------------------------------------------------------------------- /code/rails_app/config/initializers/json.rb: -------------------------------------------------------------------------------- 1 | ActiveRecord::Base.include_root_in_json = true 2 | -------------------------------------------------------------------------------- /code/rails_app/.gitignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | db/*.sqlite3 3 | log/*.log 4 | tmp/**/* 5 | Gemfile.lock 6 | -------------------------------------------------------------------------------- /code/rails_app/app/views/goals/new.html.erb: -------------------------------------------------------------------------------- 1 | <% banner "New Goal" %> 2 | 3 | <%= render 'form' %> -------------------------------------------------------------------------------- /code/rails_app/app/views/goals/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% banner "Edit Goal" %> 2 | 3 | <%= render 'form' %> 4 | -------------------------------------------------------------------------------- /code/rails_app/test/fixtures/credits.yml: -------------------------------------------------------------------------------- 1 | latte: 2 | name: Latte 3 | amount: 5.00 4 | goal: ipad -------------------------------------------------------------------------------- /code/2-json/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/2-json/icon.png -------------------------------------------------------------------------------- /code/4-crud/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/4-crud/icon.png -------------------------------------------------------------------------------- /code/rails_app/test/fixtures/goals.yml: -------------------------------------------------------------------------------- 1 | ipad: 2 | name: iPad 3 | amount: 500.0 4 | user: default 5 | -------------------------------------------------------------------------------- /code/1-bootstrap/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/1-bootstrap/icon.png -------------------------------------------------------------------------------- /code/3-scaffold/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/3-scaffold/icon.png -------------------------------------------------------------------------------- /code/5-httpriot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/5-httpriot/icon.png -------------------------------------------------------------------------------- /code/iphone_app/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/iphone_app/icon.png -------------------------------------------------------------------------------- /code/rails_app/app/views/credits/new.html.erb: -------------------------------------------------------------------------------- 1 | <% banner "New #{@goal.name} Credit" %> 2 | 3 | <%= render 'form' %> 4 | -------------------------------------------------------------------------------- /code/rails_app/coverage.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/rails_app/coverage.data -------------------------------------------------------------------------------- /screenshots/iphone-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/screenshots/iphone-app.png -------------------------------------------------------------------------------- /code/rails_app/app/views/credits/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% banner "Edit Credit for #{h(@goal.name)}" %> 2 | 3 | <%= render 'form' %> 4 | -------------------------------------------------------------------------------- /code/5-httpriot/HTTPRiot/Vendor/KissXML/DDXML.h: -------------------------------------------------------------------------------- 1 | #import "DDXMLNode.h" 2 | #import "DDXMLElement.h" 3 | #import "DDXMLDocument.h" 4 | -------------------------------------------------------------------------------- /code/6-objectiveresource/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/6-objectiveresource/icon.png -------------------------------------------------------------------------------- /workbook/assets/images/books.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/books.png -------------------------------------------------------------------------------- /workbook/assets/images/goal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/goal.png -------------------------------------------------------------------------------- /workbook/assets/images/goals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/goals.png -------------------------------------------------------------------------------- /workbook/assets/images/ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/ipad.png -------------------------------------------------------------------------------- /workbook/assets/images/iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/iphone.png -------------------------------------------------------------------------------- /workbook/assets/images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/login.png -------------------------------------------------------------------------------- /workbook/assets/images/add-goal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/add-goal.png -------------------------------------------------------------------------------- /workbook/assets/images/scaffold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/scaffold.png -------------------------------------------------------------------------------- /code/rails_app/app/controllers/info_controller.rb: -------------------------------------------------------------------------------- 1 | class InfoController < ApplicationController 2 | 3 | def index 4 | end 5 | 6 | end -------------------------------------------------------------------------------- /code/rails_app/public/images/rails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/rails_app/public/images/rails.png -------------------------------------------------------------------------------- /code/rails_app/public/images/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/code/rails_app/public/images/video.png -------------------------------------------------------------------------------- /workbook/assets/images/edit-goal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/edit-goal.png -------------------------------------------------------------------------------- /workbook/assets/images/table-crud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/table-crud.png -------------------------------------------------------------------------------- /workbook/assets/ui/default/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/ui/default/blank.gif -------------------------------------------------------------------------------- /workbook/assets/ui/default/bodybg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/ui/default/bodybg.gif -------------------------------------------------------------------------------- /code/1-bootstrap/README.md: -------------------------------------------------------------------------------- 1 | Save Up iPhone App 2 | ================== 3 | 4 | This version is a basic read-only table view with no networking. 5 | -------------------------------------------------------------------------------- /workbook/assets/images/deleting-rows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/deleting-rows.png -------------------------------------------------------------------------------- /code/5-httpriot/README.md: -------------------------------------------------------------------------------- 1 | Save Up iPhone App 2 | ================== 3 | 4 | This version uses the HTTPRiot library to CRUD remote goals (asynchronous). -------------------------------------------------------------------------------- /workbook/assets/images/authentication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/authentication.png -------------------------------------------------------------------------------- /workbook/assets/images/basic-table-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/basic-table-view.png -------------------------------------------------------------------------------- /workbook/assets/images/fetching-goals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/fetching-goals.png -------------------------------------------------------------------------------- /workbook/assets/images/final-iphone-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/final-iphone-app.png -------------------------------------------------------------------------------- /workbook/assets/images/nested-resources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/nested-resources.png -------------------------------------------------------------------------------- /workbook/assets/images/pragmatic-studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/pragmatic-studio.png -------------------------------------------------------------------------------- /workbook/assets/images/table-crud-remote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/table-crud-remote.png -------------------------------------------------------------------------------- /workbook/assets/images/basic-table-view-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/basic-table-view-delete.png -------------------------------------------------------------------------------- /workbook/assets/images/table-crud-remote-async.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/images/table-crud-remote-async.png -------------------------------------------------------------------------------- /workbook/assets/syntaxhighlighter/styles/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/syntaxhighlighter/styles/help.png -------------------------------------------------------------------------------- /code/2-json/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.pbxuser 3 | *.mode1v3 4 | *.perspective 5 | *.perspectivev3 6 | *~.nib 7 | *~.xib 8 | !default.pbxuser 9 | !default.mode1v3 10 | -------------------------------------------------------------------------------- /code/4-crud/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.pbxuser 3 | *.mode1v3 4 | *.perspective 5 | *.perspectivev3 6 | *~.nib 7 | *~.xib 8 | !default.pbxuser 9 | !default.mode1v3 10 | -------------------------------------------------------------------------------- /code/6-objectiveresource/README.md: -------------------------------------------------------------------------------- 1 | Save Up iPhone App 2 | ================== 3 | 4 | This version uses the ObjectiveResource library to CRUD remote goals (synchronous). 5 | -------------------------------------------------------------------------------- /code/rails_app/app/helpers/goals_helper.rb: -------------------------------------------------------------------------------- 1 | module GoalsHelper 2 | 3 | def goal_total_class(goal) 4 | goal.reached? ? 'over' : 'under' 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /workbook/assets/syntaxhighlighter/styles/printer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/syntaxhighlighter/styles/printer.png -------------------------------------------------------------------------------- /code/1-bootstrap/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.pbxuser 3 | *.mode1v3 4 | *.perspective 5 | *.perspectivev3 6 | *~.nib 7 | *~.xib 8 | !default.pbxuser 9 | !default.mode1v3 10 | -------------------------------------------------------------------------------- /code/3-scaffold/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.pbxuser 3 | *.mode1v3 4 | *.perspective 5 | *.perspectivev3 6 | *~.nib 7 | *~.xib 8 | !default.pbxuser 9 | !default.mode1v3 10 | -------------------------------------------------------------------------------- /code/5-httpriot/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.pbxuser 3 | *.mode1v3 4 | *.perspective 5 | *.perspectivev3 6 | *~.nib 7 | *~.xib 8 | !default.pbxuser 9 | !default.mode1v3 10 | -------------------------------------------------------------------------------- /code/iphone_app/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.pbxuser 3 | *.mode1v3 4 | *.perspective 5 | *.perspectivev3 6 | *~.nib 7 | *~.xib 8 | !default.pbxuser 9 | !default.mode1v3 10 | -------------------------------------------------------------------------------- /workbook/assets/syntaxhighlighter/scripts/clipboard.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/syntaxhighlighter/scripts/clipboard.swf -------------------------------------------------------------------------------- /workbook/assets/syntaxhighlighter/styles/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/syntaxhighlighter/styles/magnifier.png -------------------------------------------------------------------------------- /code/4-crud/README.md: -------------------------------------------------------------------------------- 1 | Save Up iPhone App 2 | ================== 3 | 4 | This version is the finished app for using a custom Resource class 5 | to CRUD remote goals (synchronous). -------------------------------------------------------------------------------- /code/3-scaffold/README.md: -------------------------------------------------------------------------------- 1 | Save Up iPhone App 2 | ================== 3 | 4 | This version is the starting point for using a custom Resource class 5 | to CRUD remote goals (synchronous). -------------------------------------------------------------------------------- /code/6-objectiveresource/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.pbxuser 3 | *.mode1v3 4 | *.perspective 5 | *.perspectivev3 6 | *~.nib 7 | *~.xib 8 | !default.pbxuser 9 | !default.mode1v3 10 | -------------------------------------------------------------------------------- /workbook/assets/syntaxhighlighter/styles/page_white_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/syntaxhighlighter/styles/page_white_code.png -------------------------------------------------------------------------------- /workbook/assets/syntaxhighlighter/styles/page_white_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarkware/iphone-rails-tutorial/HEAD/workbook/assets/syntaxhighlighter/styles/page_white_copy.png -------------------------------------------------------------------------------- /code/5-httpriot/HTTPRiot/Extensions/NSDictionary+ParamUtils.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSDictionary (ParamUtils) 4 | - (NSString*) toQueryString; 5 | @end 6 | 7 | -------------------------------------------------------------------------------- /code/5-httpriot/HTTPRiot/Extensions/NSString+EscapingUtils.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSString (EscapingUtils) 4 | - (NSString *) stringByPreparingForURL; 5 | @end 6 | -------------------------------------------------------------------------------- /code/rails_app/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Saveup::Application 5 | -------------------------------------------------------------------------------- /code/rails_app/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the rails application 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the rails application 5 | Saveup::Application.initialize! 6 | -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/JSON/JSONSerializableSupport.h: -------------------------------------------------------------------------------- 1 | #import "NSObject+JSONSerializableSupport.h" 2 | #import "NSDictionary+JSONSerializableSupport.h" -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/JSON/JSONSerializableSupport.h: -------------------------------------------------------------------------------- 1 | #import "NSObject+JSONSerializableSupport.h" 2 | #import "NSDictionary+JSONSerializableSupport.h" -------------------------------------------------------------------------------- /code/rails_app/public/javascripts/application.js: -------------------------------------------------------------------------------- 1 | document.observe("dom:loaded", function() { 2 | var firstField = $$('input[type=text]').first(); 3 | if (firstField) { 4 | firstField.activate(); 5 | } 6 | }) -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/JSON/JSONSerializableSupport.h: -------------------------------------------------------------------------------- 1 | #import "NSObject+JSONSerializableSupport.h" 2 | #import "NSDictionary+JSONSerializableSupport.h" -------------------------------------------------------------------------------- /code/rails_app/coverage/print.css: -------------------------------------------------------------------------------- 1 | /* Hide controls */ 2 | 3 | body { 4 | color: #000000; 5 | background-color: #ffffff; 6 | } 7 | 8 | /* Hide controls */ 9 | 10 | div.filters { 11 | display: none; 12 | } -------------------------------------------------------------------------------- /code/rails_app/app/views/credits/index.html.erb: -------------------------------------------------------------------------------- 1 | <% banner "#{h(@goal.name)} Credits", 2 | link_to('Create new credit', new_goal_credit_path(@goal)) %> 3 | 4 | <%= render 'goals/credits', :credits => @goal.credits, :goal => @goal %> 5 | -------------------------------------------------------------------------------- /code/2-json/Classes/GoalsViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GoalsViewController : UITableViewController { 4 | NSMutableArray *goals; 5 | } 6 | 7 | @property (nonatomic, retain) NSArray *goals; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /code/rails_app/doc/README_FOR_APP: -------------------------------------------------------------------------------- 1 | Use this README file to introduce your application and point to useful places in the API for learning more. 2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. 3 | -------------------------------------------------------------------------------- /code/rails_app/test/fixtures/users.yml: -------------------------------------------------------------------------------- 1 | <% SALT = "NaCl" unless defined?(SALT) %> 2 | 3 | default: 4 | username: saver 5 | email: saver@saveup.com 6 | password_salt: <%= SALT %> 7 | password_hash: <%= User.encrypted_password('testing', SALT) %> -------------------------------------------------------------------------------- /code/rails_app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-Agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /code/1-bootstrap/Classes/GoalsViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GoalsViewController : UITableViewController { 4 | NSMutableArray *goals; 5 | } 6 | 7 | @property (nonatomic, retain) NSMutableArray *goals; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /code/rails_app/app/views/goals/_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= labeled_form_for @goal do |f| %> 2 |
3 | <%= f.error_messages %> 4 | <%= f.text_field :name %> 5 | <%= f.text_field :amount, :size => 10 %> 6 | <%= f.submit %> 7 |
8 | <% end %> 9 | -------------------------------------------------------------------------------- /code/rails_app/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | -------------------------------------------------------------------------------- /code/rails_app/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Sample localization file for English. Add more files in this directory for other locales. 2 | # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. 3 | 4 | en: 5 | hello: "Hello world" 6 | -------------------------------------------------------------------------------- /workbook/assets/ui/default/opera.css: -------------------------------------------------------------------------------- 1 | /* DO NOT CHANGE THESE unless you really want to break Opera Show */ 2 | .slide { 3 | visibility: visible !important; 4 | position: static !important; 5 | page-break-before: always; 6 | } 7 | #slide0 {page-break-before: avoid;} 8 | -------------------------------------------------------------------------------- /code/2-json/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[]) { 4 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 5 | int retVal = UIApplicationMain(argc, argv, nil, nil); 6 | [pool release]; 7 | return retVal; 8 | } 9 | -------------------------------------------------------------------------------- /code/4-crud/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[]) { 4 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 5 | int retVal = UIApplicationMain(argc, argv, nil, nil); 6 | [pool release]; 7 | return retVal; 8 | } 9 | -------------------------------------------------------------------------------- /code/1-bootstrap/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[]) { 4 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 5 | int retVal = UIApplicationMain(argc, argv, nil, nil); 6 | [pool release]; 7 | return retVal; 8 | } 9 | -------------------------------------------------------------------------------- /code/3-scaffold/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[]) { 4 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 5 | int retVal = UIApplicationMain(argc, argv, nil, nil); 6 | [pool release]; 7 | return retVal; 8 | } 9 | -------------------------------------------------------------------------------- /code/5-httpriot/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[]) { 4 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 5 | int retVal = UIApplicationMain(argc, argv, nil, nil); 6 | [pool release]; 7 | return retVal; 8 | } 9 | -------------------------------------------------------------------------------- /code/iphone_app/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[]) { 4 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 5 | int retVal = UIApplicationMain(argc, argv, nil, nil); 6 | [pool release]; 7 | return retVal; 8 | } 9 | -------------------------------------------------------------------------------- /code/rails_app/app/views/credits/_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= labeled_form_for([@goal, @credit]) do |f| %> 2 |
3 | <%= f.error_messages %> 4 | <%= f.text_field :name %> 5 | <%= f.text_field :amount, :size => 10 %> 6 | <%= f.submit %> 7 |
8 | <% end %> 9 | -------------------------------------------------------------------------------- /workbook/assets/ui/default/slides.css: -------------------------------------------------------------------------------- 1 | @import url(s5-core.css); /* required to make the slide show run at all */ 2 | @import url(framing.css); /* sets basic placement and size of slide components */ 3 | @import url(pretty.css); /* stuff that makes the slides look better than blah */ -------------------------------------------------------------------------------- /code/iphone_app/Classes/Session.m: -------------------------------------------------------------------------------- 1 | #import "Session.h" 2 | 3 | @implementation Session 4 | 5 | @synthesize login; 6 | @synthesize password; 7 | 8 | - (void)dealloc { 9 | [login release]; 10 | [password release]; 11 | [super dealloc]; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /code/iphone_app/SaveUp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SaveUp' target in the 'SaveUp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #import "AppHelpers.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /code/6-objectiveresource/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[]) { 4 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 5 | int retVal = UIApplicationMain(argc, argv, nil, nil); 6 | [pool release]; 7 | return retVal; 8 | } 9 | -------------------------------------------------------------------------------- /code/iphone_app/Classes/Session.h: -------------------------------------------------------------------------------- 1 | #import "ObjectiveResource.h" 2 | 3 | @interface Session : NSObject { 4 | NSString *login; 5 | NSString *password; 6 | } 7 | 8 | @property (nonatomic, copy) NSString *login; 9 | @property (nonatomic, copy) NSString *password; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /code/4-crud/Classes/GoalsViewController.h: -------------------------------------------------------------------------------- 1 | #import "GoalAddViewController.h" 2 | 3 | @interface GoalsViewController : UITableViewController { 4 | NSMutableArray *goals; 5 | } 6 | 7 | @property (nonatomic, retain) NSArray *goals; 8 | 9 | - (IBAction)add; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /code/3-scaffold/Classes/GoalsViewController.h: -------------------------------------------------------------------------------- 1 | #import "GoalAddViewController.h" 2 | 3 | @interface GoalsViewController : UITableViewController { 4 | NSMutableArray *goals; 5 | } 6 | 7 | @property (nonatomic, retain) NSArray *goals; 8 | 9 | - (IBAction)add; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /code/4-crud/Classes/AppHelpers.h: -------------------------------------------------------------------------------- 1 | #define TABLE_BACKGROUND_COLOR [UIColor colorWithRed:0.951 green:0.951 blue:0.951 alpha:1.000] 2 | 3 | void showAlert(NSString *message); 4 | 5 | NSString *formatDate(NSDate *date); 6 | NSDate *parseDateTime(NSString *dateTimeString); 7 | 8 | NSString* numberToCurrency(NSString *number); -------------------------------------------------------------------------------- /code/6-objectiveresource/Classes/GoalsViewController.h: -------------------------------------------------------------------------------- 1 | #import "GoalAddViewController.h" 2 | 3 | @interface GoalsViewController : UITableViewController { 4 | NSMutableArray *goals; 5 | } 6 | 7 | @property (nonatomic, retain) NSArray *goals; 8 | 9 | - (IBAction)add; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /code/rails_app/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | require 'rake' 6 | 7 | Saveup::Application.load_tasks 8 | 9 | -------------------------------------------------------------------------------- /code/rails_app/test/performance/browsing_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | require 'rails/performance_test_help' 3 | 4 | # Profiling results for each test method are written to tmp/performance. 5 | class BrowsingTest < ActionDispatch::PerformanceTest 6 | def test_homepage 7 | get '/' 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /code/3-scaffold/Classes/AppHelpers.h: -------------------------------------------------------------------------------- 1 | #define TABLE_BACKGROUND_COLOR [UIColor colorWithRed:0.951 green:0.951 blue:0.951 alpha:1.000] 2 | 3 | void showAlert(NSString *message); 4 | 5 | NSString *formatDate(NSDate *date); 6 | NSDate *parseDateTime(NSString *dateTimeString); 7 | 8 | NSString* numberToCurrency(NSString *number); -------------------------------------------------------------------------------- /code/5-httpriot/Classes/AppHelpers.h: -------------------------------------------------------------------------------- 1 | #define TABLE_BACKGROUND_COLOR [UIColor colorWithRed:0.951 green:0.951 blue:0.951 alpha:1.000] 2 | 3 | void showAlert(NSString *message); 4 | 5 | NSString *formatDate(NSDate *date); 6 | NSDate *parseDateTime(NSString *dateTimeString); 7 | 8 | NSString* numberToCurrency(NSString *number); -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/NSError+Error.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+Error.h 3 | // objective_resource 4 | // 5 | // Created by Adam Alexander on 3/10/09. 6 | // Copyright 2009 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | @interface NSError(Error) 10 | 11 | -(NSArray *)errors; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/NSError+Error.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+Error.h 3 | // objective_resource 4 | // 5 | // Created by Adam Alexander on 3/10/09. 6 | // Copyright 2009 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | @interface NSError(Error) 10 | 11 | -(NSArray *)errors; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /code/6-objectiveresource/Classes/AppHelpers.h: -------------------------------------------------------------------------------- 1 | #define TABLE_BACKGROUND_COLOR [UIColor colorWithRed:0.951 green:0.951 blue:0.951 alpha:1.000] 2 | 3 | void showAlert(NSString *message); 4 | 5 | NSString *formatDate(NSDate *date); 6 | NSDate *parseDateTime(NSString *dateTimeString); 7 | 8 | NSString* numberToCurrency(NSString *number); -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/NSError+Error.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+Error.h 3 | // objective_resource 4 | // 5 | // Created by Adam Alexander on 3/10/09. 6 | // Copyright 2009 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | @interface NSError(Error) 10 | 11 | -(NSArray *)errors; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /code/4-crud/Classes/Resource.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Resource : NSObject { 4 | } 5 | 6 | + (NSString *)get:(NSString *)url; 7 | + (NSString *)post:(NSString *)body to:(NSString *)url; 8 | + (NSString *)put:(NSString *)body to:(NSString *)url; 9 | + (NSString *)delete:(NSString *)url; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /code/rails_app/script/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. 3 | 4 | APP_PATH = File.expand_path('../../config/application', __FILE__) 5 | require File.expand_path('../../config/boot', __FILE__) 6 | require 'rails/commands' 7 | -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/ObjectiveResource.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveResource.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/24/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "NSObject+ObjectiveResource.h" 10 | #import "ObjectiveResourceConfig.h" 11 | #import "NSError+Error.h" -------------------------------------------------------------------------------- /code/3-scaffold/Classes/Resource.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Resource : NSObject { 4 | } 5 | 6 | + (NSString *)get:(NSString *)url; 7 | + (NSString *)post:(NSString *)body to:(NSString *)url; 8 | + (NSString *)put:(NSString *)body to:(NSString *)url; 9 | + (NSString *)delete:(NSString *)url; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/ObjectiveResource.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveResource.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/24/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "NSObject+ObjectiveResource.h" 10 | #import "ObjectiveResourceConfig.h" 11 | #import "NSError+Error.h" -------------------------------------------------------------------------------- /code/rails_app/app/views/goals/_summary.html.erb: -------------------------------------------------------------------------------- 1 | 2 | <%= number_to_currency(goal.saved) %> 3 | 4 | 5 | of <%= number_to_currency(goal.amount) %> 6 | 7 | 8 | (<%= number_to_currency(goal.remaining.abs) %>) 9 | 10 | -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/ObjectiveResource.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveResource.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/24/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "NSObject+ObjectiveResource.h" 10 | #import "ObjectiveResourceConfig.h" 11 | #import "NSError+Error.h" -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/Core/CoreSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "NSString+GSub.h" 10 | #import "NSString+InflectionSupport.h" 11 | #import "NSObject+PropertySupport.h" -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/json-framework/JSONFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // JSONFramework.h 3 | // iphoneAndRails1 4 | // 5 | // Created by vickeryj on 12/11/08. 6 | // Copyright 2008 Joshua Vickery. All rights reserved. 7 | // 8 | 9 | #import "SBJSON.h" 10 | #import "NSObject+SBJSON.h" 11 | #import "NSString+SBJSON.h" -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/Core/CoreSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "NSString+GSub.h" 10 | #import "NSString+InflectionSupport.h" 11 | #import "NSObject+PropertySupport.h" -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/Core/ObjectiveSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "CoreSupport.h" 10 | #import "XMLSerializableSupport.h" 11 | #import "JSONSerializableSupport.h" -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/json-framework/JSONFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // JSONFramework.h 3 | // iphoneAndRails1 4 | // 5 | // Created by vickeryj on 12/11/08. 6 | // Copyright 2008 Joshua Vickery. All rights reserved. 7 | // 8 | 9 | #import "SBJSON.h" 10 | #import "NSObject+SBJSON.h" 11 | #import "NSString+SBJSON.h" -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/Core/ObjectiveSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "CoreSupport.h" 10 | #import "XMLSerializableSupport.h" 11 | #import "JSONSerializableSupport.h" -------------------------------------------------------------------------------- /code/5-httpriot/HTTPRiot/Vendor/KissXML/NSStringAdditions.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | 5 | @interface NSString (NSStringAdditions) 6 | 7 | /** 8 | * xmlChar - A basic replacement for char, a byte in a UTF-8 encoded string. 9 | **/ 10 | - (const xmlChar *)xmlChar; 11 | 12 | - (NSString *)stringByTrimming; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/objective_support/Classes/lib/json-framework/JSONFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // JSONFramework.h 3 | // iphoneAndRails1 4 | // 5 | // Created by vickeryj on 12/11/08. 6 | // Copyright 2008 Joshua Vickery. All rights reserved. 7 | // 8 | 9 | #import "SBJSON.h" 10 | #import "NSObject+SBJSON.h" 11 | #import "NSString+SBJSON.h" -------------------------------------------------------------------------------- /code/5-httpriot/HTTPRiot/Formatters/HRFormatXML.h: -------------------------------------------------------------------------------- 1 | // 2 | // HRFormatXML.h 3 | // HTTPRiot 4 | // 5 | // Created by Justin Palmer on 2/8/09. 6 | // Copyright 2009 Alternateidea. All rights reserved. 7 | // 8 | #import 9 | #import "HRFormatterProtocol.h" 10 | @interface HRFormatXML : NSObject { 11 | 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/objective_support/Classes/lib/Core/CoreSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "NSString+GSub.h" 10 | #import "NSString+InflectionSupport.h" 11 | #import "NSObject+PropertySupport.h" -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/objective_support/Classes/lib/Core/ObjectiveSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectiveSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | #import "CoreSupport.h" 10 | #import "XMLSerializableSupport.h" 11 | #import "JSONSerializableSupport.h" -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | #import "NSObject+Serialize.h" 10 | #import "NSDate+Serialize.h" 11 | #import "NSString+Serialize.h" 12 | -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | #import "NSObject+Serialize.h" 10 | #import "NSDate+Serialize.h" 11 | #import "NSString+Serialize.h" 12 | -------------------------------------------------------------------------------- /code/5-httpriot/HTTPRiot/Formatters/HRFormatJSON.h: -------------------------------------------------------------------------------- 1 | // 2 | // HRFormatJSON.h 3 | // HTTPRiot 4 | // 5 | // Created by Justin Palmer on 2/8/09. 6 | // Copyright 2009 Alternateidea. All rights reserved. 7 | // 8 | #import 9 | #import "HRFormatterProtocol.h" 10 | 11 | @interface HRFormatJSON : NSObject { 12 | 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/XML/NSNull+XMLSerializableSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNull+XMLSerializableSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | @interface NSNull (XMLSerializableSupport) 10 | - (NSString *)toXMLValue; 11 | @end 12 | -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | #import "NSObject+Serialize.h" 10 | #import "NSDate+Serialize.h" 11 | #import "NSString+Serialize.h" 12 | -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/XML/NSNull+XMLSerializableSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNull+XMLSerializableSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | @interface NSNull (XMLSerializableSupport) 10 | - (NSString *)toXMLValue; 11 | @end 12 | -------------------------------------------------------------------------------- /code/rails_app/app/controllers/users_controller.rb: -------------------------------------------------------------------------------- 1 | class UsersController < ApplicationController 2 | 3 | def new 4 | @user = User.new 5 | end 6 | 7 | def create 8 | @user = User.new(params[:user]) 9 | if @user.save 10 | session[:user_id] = @user.id 11 | redirect_to root_url 12 | else 13 | render :action => :new 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /code/rails_app/db/migrate/20100504141007_create_goals.rb: -------------------------------------------------------------------------------- 1 | class CreateGoals < ActiveRecord::Migration 2 | 3 | def self.up 4 | create_table :goals do |t| 5 | t.string :name 6 | t.decimal :amount, :precision => 8, :scale => 2 7 | t.integer :user_id 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :goals 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/XML/NSNull+XMLSerializableSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNull+XMLSerializableSupport.h 3 | // 4 | // 5 | // Created by Ryan Daigle on 7/31/08. 6 | // Copyright 2008 yFactorial, LLC. All rights reserved. 7 | // 8 | 9 | @interface NSNull (XMLSerializableSupport) 10 | - (NSString *)toXMLValue; 11 | @end 12 | -------------------------------------------------------------------------------- /code/2-json/SaveUp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SaveUp' target in the 'SaveUp' project 3 | // 4 | #import 5 | 6 | #ifndef __IPHONE_3_0 7 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 8 | #endif 9 | 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /code/iphone_app/Classes/GoalsViewController.h: -------------------------------------------------------------------------------- 1 | @interface GoalsViewController : UIViewController { 2 | NSMutableArray *goals; 3 | UITableView *tableView; 4 | } 5 | 6 | @property (nonatomic, retain) NSArray *goals; 7 | @property (nonatomic, retain) IBOutlet UITableView *tableView; 8 | 9 | - (IBAction)add; 10 | - (IBAction)refresh; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/NSObject+Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | @interface NSObject(Serialize) 10 | 11 | + (id) deserialize:(id)value; 12 | - (id) serialize; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/NSDate+Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | @interface NSDate(Serialize) 10 | 11 | + (NSDate *) deserialize:(id)value; 12 | - (NSString *) serialize; 13 | @end 14 | -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/NSObject+Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | @interface NSObject(Serialize) 10 | 11 | + (id) deserialize:(id)value; 12 | - (id) serialize; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /code/1-bootstrap/SaveUp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SaveUp' target in the 'SaveUp' project 3 | // 4 | #import 5 | 6 | #ifndef __IPHONE_3_0 7 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 8 | #endif 9 | 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /code/2-json/Classes/SaveUpAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SaveUpAppDelegate : NSObject { 4 | UIWindow *window; 5 | UINavigationController *navigationController; 6 | } 7 | 8 | @property (nonatomic, retain) IBOutlet UIWindow *window; 9 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /code/3-scaffold/Classes/SaveUpAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SaveUpAppDelegate : NSObject { 4 | UIWindow *window; 5 | UINavigationController *navigationController; 6 | } 7 | 8 | @property (nonatomic, retain) IBOutlet UIWindow *window; 9 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /code/4-crud/Classes/SaveUpAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SaveUpAppDelegate : NSObject { 4 | UIWindow *window; 5 | UINavigationController *navigationController; 6 | } 7 | 8 | @property (nonatomic, retain) IBOutlet UIWindow *window; 9 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /code/5-httpriot/Classes/SaveUpAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SaveUpAppDelegate : NSObject { 4 | UIWindow *window; 5 | UINavigationController *navigationController; 6 | } 7 | 8 | @property (nonatomic, retain) IBOutlet UIWindow *window; 9 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/NSDate+Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | @interface NSDate(Serialize) 10 | 11 | + (NSDate *) deserialize:(id)value; 12 | - (NSString *) serialize; 13 | @end 14 | -------------------------------------------------------------------------------- /code/rails_app/config/boot.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | 3 | # Set up gems listed in the Gemfile. 4 | gemfile = File.expand_path('../../Gemfile', __FILE__) 5 | begin 6 | ENV['BUNDLE_GEMFILE'] = gemfile 7 | require 'bundler' 8 | Bundler.setup 9 | rescue Bundler::GemNotFound => e 10 | STDERR.puts e.message 11 | STDERR.puts "Try running `bundle install`." 12 | exit! 13 | end if File.exist?(gemfile) 14 | -------------------------------------------------------------------------------- /code/rails_app/db/migrate/20100504141557_create_credits.rb: -------------------------------------------------------------------------------- 1 | class CreateCredits < ActiveRecord::Migration 2 | 3 | def self.up 4 | create_table :credits do |t| 5 | t.string :name 6 | t.decimal :amount, :precision => 8, :scale => 2 7 | t.integer :goal_id 8 | 9 | t.timestamps 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :credits 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /code/1-bootstrap/Classes/SaveUpAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SaveUpAppDelegate : NSObject { 4 | UIWindow *window; 5 | UINavigationController *navigationController; 6 | } 7 | 8 | @property (nonatomic, retain) IBOutlet UIWindow *window; 9 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/NSObject+Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | @interface NSObject(Serialize) 10 | 11 | + (id) deserialize:(id)value; 12 | - (id) serialize; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /code/iphone_app/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/XML/NSNumber+XMLSerializableSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+XMLSerializableSupport.h 3 | // objective_support 4 | // 5 | // Created by James Burka on 2/17/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | @interface NSNumber(XMLSerializableSupport) 10 | - (NSString *)toXMLValue; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /code/staged/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/XML/NSNumber+XMLSerializableSupport.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+XMLSerializableSupport.h 3 | // objective_support 4 | // 5 | // Created by James Burka on 2/17/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | @interface NSNumber(XMLSerializableSupport) 10 | - (NSString *)toXMLValue; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /code/6-objectiveresource/Classes/SaveUpAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SaveUpAppDelegate : NSObject { 4 | UIWindow *window; 5 | UINavigationController *navigationController; 6 | } 7 | 8 | @property (nonatomic, retain) IBOutlet UIWindow *window; 9 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /code/6-objectiveresource/objectiveresource/Classes/lib/objective_support/Classes/lib/Serialization/NSDate+Serialize.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+Deserialize.h 3 | // active_resource 4 | // 5 | // Created by James Burka on 1/19/09. 6 | // Copyright 2009 Burkaprojects. All rights reserved. 7 | // 8 | 9 | @interface NSDate(Serialize) 10 | 11 | + (NSDate *) deserialize:(id)value; 12 | - (NSString *) serialize; 13 | @end 14 | -------------------------------------------------------------------------------- /code/rails_app/config/initializers/form_errors.rb: -------------------------------------------------------------------------------- 1 | # For inline form-field error messages 2 | ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| 3 | if html_tag =~ /type="hidden"/ || html_tag =~ /