Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mostly updated to work with mongoid 2.4

  • Loading branch information...
commit 795daeb65d2b33012ea80fef2382ec01374a92cf 2 parents da8e61c + d8cd056
@kristianmandrup authored
Showing with 3,109 additions and 157 deletions.
  1. +8 −0 .idea/.generators
  2. +7 −0 .idea/.rakeTasks
  3. +5 −0 .idea/encodings.xml
  4. +11 −0 .idea/misc.xml
  5. +9 −0 .idea/modules.xml
  6. +189 −0 .idea/mongoid-carrierwave-uploadify.iml
  7. +8 −0 .idea/vcs.xml
  8. +653 −0 .idea/workspace.xml
  9. +5 −8 Gemfile
  10. +141 −113 Gemfile.lock
  11. +44 −0 app/controllers/companies_controller.rb
  12. +83 −0 app/controllers/people_controller.rb
  13. +98 −0 app/controllers/pets_controller.rb
  14. +83 −0 app/controllers/petsitters_controller.rb
  15. +37 −11 app/controllers/photos_controller.rb
  16. +43 −0 app/controllers/products_controller.rb
  17. +24 −6 app/helpers/application_helper.rb
  18. +2 −0  app/helpers/companies_helper.rb
  19. +2 −0  app/helpers/people_helper.rb
  20. +2 −0  app/helpers/pets_helper.rb
  21. +2 −0  app/helpers/petsitters_helper.rb
  22. +2 −0  app/helpers/products_helper.rb
  23. +9 −0 app/models/company.rb
  24. +9 −0 app/models/person.rb
  25. +7 −0 app/models/pet.rb
  26. +6 −0 app/models/petsitter.rb
  27. +5 −3 app/models/photo.rb
  28. +9 −0 app/models/product.rb
  29. +4 −1 app/uploaders/image_uploader.rb
  30. +16 −0 app/views/companies/_form.html.haml
  31. +3 −0  app/views/companies/edit.html.haml
  32. +21 −0 app/views/companies/index.html.haml
  33. +5 −0 app/views/companies/new.html.haml
  34. +24 −0 app/views/companies/show.html.haml
  35. +16 −0 app/views/people/_form.html.haml
  36. +7 −0 app/views/people/edit.html.haml
  37. +21 −0 app/views/people/index.html.haml
  38. +5 −0 app/views/people/new.html.haml
  39. +18 −0 app/views/people/show.html.haml
  40. +16 −0 app/views/pets/_form.html.haml
  41. +7 −0 app/views/pets/edit.html.haml
  42. +21 −0 app/views/pets/index.html.haml
  43. +5 −0 app/views/pets/new.html.haml
  44. +12 −0 app/views/pets/show.html.haml
  45. +13 −0 app/views/petsitters/_form.html.haml
  46. +7 −0 app/views/petsitters/edit.html.haml
  47. +19 −0 app/views/petsitters/index.html.haml
  48. +5 −0 app/views/petsitters/new.html.haml
  49. +9 −0 app/views/petsitters/show.html.haml
  50. +4 −2 app/views/photos/_form.html.haml
  51. +22 −0 app/views/photos/_form_fix.html.haml
  52. +6 −3 app/views/photos/_photo.html.haml
  53. +3 −3 app/views/photos/edit.html.haml
  54. +5 −3 app/views/photos/new.html.haml
  55. +2 −2 app/views/photos/show.html.haml
  56. +19 −0 app/views/products/_form.html.haml
  57. +7 −0 app/views/products/edit.html.haml
  58. +23 −0 app/views/products/index.html.haml
  59. +5 −0 app/views/products/new.html.haml
  60. +39 −0 app/views/products/show.html.haml
  61. +2 −2 app/views/stories/show.html.haml
  62. +7 −0 config/initializers/mongoid.rb
  63. +21 −0 config/routes.rb
  64. BIN  public/images/logo.jpg
  65. BIN  public/images/pic-upload.png
  66. +47 −0 spec/controllers/companies_controller_spec.rb
  67. +127 −0 spec/controllers/people_controller_spec.rb
  68. +127 −0 spec/controllers/pets_controller_spec.rb
  69. +127 −0 spec/controllers/petsitters_controller_spec.rb
  70. +125 −0 spec/controllers/products_controller_spec.rb
  71. +15 −0 spec/helpers/companies_helper_spec.rb
  72. +15 −0 spec/helpers/people_helper_spec.rb
  73. +15 −0 spec/helpers/pets_helper_spec.rb
  74. +15 −0 spec/helpers/petsitters_helper_spec.rb
  75. +15 −0 spec/helpers/products_helper_spec.rb
  76. +5 −0 spec/models/company_spec.rb
  77. +5 −0 spec/models/person_spec.rb
  78. +5 −0 spec/models/pet_spec.rb
  79. +5 −0 spec/models/petsitter_spec.rb
  80. +5 −0 spec/models/product_spec.rb
  81. +35 −0 spec/routing/people_routing_spec.rb
  82. +35 −0 spec/routing/pets_routing_spec.rb
  83. +35 −0 spec/routing/petsitters_routing_spec.rb
  84. +35 −0 spec/routing/products_routing_spec.rb
  85. +2 −0  spec/spec_helper.rb
  86. +5 −0 spec/views/companies/delete.html.haml_spec.rb
  87. +5 −0 spec/views/companies/destroy.html.haml_spec.rb
  88. +5 −0 spec/views/companies/edit.html.haml_spec.rb
  89. +5 −0 spec/views/companies/index.html.haml_spec.rb
  90. +5 −0 spec/views/companies/show.html.haml_spec.rb
  91. +5 −0 spec/views/companies/update.html.haml_spec.rb
  92. +20 −0 spec/views/people/edit.html.haml_spec.rb
  93. +24 −0 spec/views/people/index.html.haml_spec.rb
  94. +20 −0 spec/views/people/new.html.haml_spec.rb
  95. +18 −0 spec/views/people/show.html.haml_spec.rb
  96. +20 −0 spec/views/pets/edit.html.haml_spec.rb
  97. +24 −0 spec/views/pets/index.html.haml_spec.rb
  98. +20 −0 spec/views/pets/new.html.haml_spec.rb
  99. +18 −0 spec/views/pets/show.html.haml_spec.rb
  100. +18 −0 spec/views/petsitters/edit.html.haml_spec.rb
  101. +20 −0 spec/views/petsitters/index.html.haml_spec.rb
  102. +18 −0 spec/views/petsitters/new.html.haml_spec.rb
  103. +15 −0 spec/views/petsitters/show.html.haml_spec.rb
  104. +22 −0 spec/views/products/edit.html.haml_spec.rb
  105. +25 −0 spec/views/products/index.html.haml_spec.rb
  106. +22 −0 spec/views/products/new.html.haml_spec.rb
  107. +18 −0 spec/views/products/show.html.haml_spec.rb
  108. +10 −0 test/integration/person_test.rb
  109. +10 −0 test/integration/pet_test.rb
  110. +10 −0 test/integration/petsitter_test.rb
  111. +10 −0 test/integration/product_test.rb
View
8 .idea/.generators
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Settings><!--This file was automatically generated by Ruby plugin.
+You are allowed to:
+1. Reorder generators
+2. Remove generators
+3. Add installed generators
+To add new installed generators automatically delete this file and reload the project.
+--><GeneratorsGroup><Generator name="active_record:devise" /><Generator name="active_record:migration" /><Generator name="active_record:model" /><Generator name="active_record:observer" /><Generator name="active_record:session_migration" /><Generator name="controller" /><Generator name="devise" /><Generator name="devise:install" /><Generator name="devise:views" /><Generator name="erb:controller" /><Generator name="erb:mailer" /><Generator name="erb:scaffold" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jquery:install" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="mongoid:config" /><Generator name="mongoid:devise" /><Generator name="observer" /><Generator name="performance_test" /><Generator name="plugin" /><Generator name="resource" /><Generator name="rspec:install" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="session_migration" /><Generator name="stylesheets" /><Generator name="test_unit:controller" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:observer" /><Generator name="test_unit:performance" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="uploader" /></GeneratorsGroup></Settings>
View
7 .idea/.rakeTasks
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Settings><!--This file was automatically generated by Ruby plugin.
+You are allowed to:
+1. Remove rake task
+2. Add existing rake tasks
+To add existing rake tasks automatically delete this file and reload the project.
+--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="List versions of all Rails frameworks and the environment" fullCmd="about" taksId="about" /><RakeGroup description="" fullCmd="" taksId="db"><RakeTask description="Drops all the collections for the database for the current Rails.env" fullCmd="db:drop" taksId="drop" /><RakeGroup description="" fullCmd="" taksId="mongoid"><RakeTask description="Clean up old collections backed up by objectid_convert" fullCmd="db:mongoid:cleanup_old_collections" taksId="cleanup_old_collections" /><RakeTask description="Create the indexes defined on your mongoid models" fullCmd="db:mongoid:create_indexes" taksId="create_indexes" /><RakeTask description="Convert string objectids in mongo database to ObjectID type" fullCmd="db:mongoid:objectid_convert" taksId="objectid_convert" /></RakeGroup><RakeTask description="Delete data and seed" fullCmd="db:reseed" taksId="reseed" /><RakeTask description="Load the seed data from db/seeds.rb" fullCmd="db:seed" taksId="seed" /><RakeTask description="Create the database, and initialize with the seed data" fullCmd="db:setup" taksId="setup" /><RakeTask description="" fullCmd="db:create" taksId="create" /><RakeTask description="" fullCmd="db:create_indexes" taksId="create_indexes" /><RakeTask description="" fullCmd="db:migrate" taksId="migrate" /><RakeGroup description="" fullCmd="" taksId="schema"><RakeTask description="" fullCmd="db:schema:load" taksId="load" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="" fullCmd="db:test:prepare" taksId="prepare" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="doc"><RakeTask description="Generate docs for the app -- also availble doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/rdoc-template.rb, TITLE=&quot;Custom Title&quot;)" fullCmd="doc:app" taksId="app" /><RakeTask description="" fullCmd="doc:clobber" taksId="clobber" /><RakeTask description="" fullCmd="doc:clobber_app" taksId="clobber_app" /><RakeTask description="" fullCmd="doc:clobber_plugins" taksId="clobber_plugins" /><RakeTask description="" fullCmd="doc:clobber_rails" taksId="clobber_rails" /><RakeTask description="" fullCmd="doc:guides" taksId="guides" /><RakeTask description="" fullCmd="doc:plugins" taksId="plugins" /><RakeTask description="" fullCmd="doc:rails" taksId="rails" /><RakeTask description="" fullCmd="doc:reapp" taksId="reapp" /><RakeTask description="" fullCmd="doc:rerails" taksId="rerails" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="log"><RakeTask description="Truncates all *.log files in log/ to zero bytes" fullCmd="log:clear" taksId="clear" /></RakeGroup><RakeTask description="Prints out your Rack middleware stack" fullCmd="middleware" taksId="middleware" /><RakeTask description="Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)" fullCmd="notes" taksId="notes" /><RakeGroup description="" fullCmd="" taksId="notes"><RakeTask description="Enumerate a custom annotation, specify with ANNOTATION=CUSTOM" fullCmd="notes:custom" taksId="custom" /><RakeTask description="" fullCmd="notes:fixme" taksId="fixme" /><RakeTask description="" fullCmd="notes:optimize" taksId="optimize" /><RakeTask description="" fullCmd="notes:todo" taksId="todo" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="rails"><RakeTask description="Applies the template supplied by LOCATION=/path/to/template" fullCmd="rails:template" taksId="template" /><RakeTask description="Update both configs and public/javascripts from Rails (or use just update:javascripts or update:configs)" fullCmd="rails:update" taksId="update" /><RakeGroup description="" fullCmd="" taksId="freeze"><RakeTask description="" fullCmd="rails:freeze:edge" taksId="edge" /><RakeTask description="" fullCmd="rails:freeze:gems" taksId="gems" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="templates"><RakeTask description="" fullCmd="rails:templates:copy" taksId="copy" /></RakeGroup><RakeTask description="" fullCmd="rails:unfreeze" taksId="unfreeze" /><RakeGroup description="" fullCmd="" taksId="update"><RakeTask description="" fullCmd="rails:update:application_controller" taksId="application_controller" /><RakeTask description="" fullCmd="rails:update:configs" taksId="configs" /><RakeTask description="" fullCmd="rails:update:javascripts" taksId="javascripts" /><RakeTask description="" fullCmd="rails:update:scripts" taksId="scripts" /></RakeGroup></RakeGroup><RakeTask description="Print out all defined routes in match order, with names" fullCmd="routes" taksId="routes" /><RakeTask description="Generate a crytographically secure secret key (this is typically used to generate a secret for cookie sessions)" fullCmd="secret" taksId="secret" /><RakeTask description="Report code statistics (KLOCs, etc) from the application" fullCmd="stats" taksId="stats" /><RakeTask description="Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)" fullCmd="test" taksId="test" /><RakeGroup description="" fullCmd="" taksId="test"><RakeTask description="Run tests for recenttest:prepare / Test recent changes" fullCmd="test:recent" taksId="recent" /><RakeTask description="Run tests for uncommittedtest:prepare / Test changes since last checkin (only Subversion and Git)" fullCmd="test:uncommitted" taksId="uncommitted" /><RakeTask description="" fullCmd="test:benchmark" taksId="benchmark" /><RakeTask description="" fullCmd="test:functionals" taksId="functionals" /><RakeTask description="" fullCmd="test:integration" taksId="integration" /><RakeTask description="" fullCmd="test:plugins" taksId="plugins" /><RakeTask description="" fullCmd="test:prepare" taksId="prepare" /><RakeTask description="" fullCmd="test:profile" taksId="profile" /><RakeTask description="" fullCmd="test:units" taksId="units" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="time"><RakeGroup description="" fullCmd="" taksId="zones"><RakeTask description="Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6" fullCmd="time:zones:all" taksId="all" /><RakeTask description="" fullCmd="time:zones:local" taksId="local" /><RakeTask description="" fullCmd="time:zones:us" taksId="us" /></RakeGroup></RakeGroup><RakeGroup description="" fullCmd="" taksId="tmp"><RakeTask description="Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)" fullCmd="tmp:clear" taksId="clear" /><RakeTask description="Creates tmp directories for sessions, cache, sockets, and pids" fullCmd="tmp:create" taksId="create" /><RakeGroup description="" fullCmd="" taksId="cache"><RakeTask description="" fullCmd="tmp:cache:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="pids"><RakeTask description="" fullCmd="tmp:pids:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sessions"><RakeTask description="" fullCmd="tmp:sessions:clear" taksId="clear" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="sockets"><RakeTask description="" fullCmd="tmp:sockets:clear" taksId="clear" /></RakeGroup></RakeGroup><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="doc" taksId="doc" /><RakeTask description="" fullCmd="doc/api" taksId="doc/api" /><RakeTask description="" fullCmd="doc/api/index.html" taksId="doc/api/index.html" /><RakeTask description="" fullCmd="doc/app" taksId="doc/app" /><RakeTask description="" fullCmd="doc/app/index.html" taksId="doc/app/index.html" /><RakeTask description="" fullCmd="environment" taksId="environment" /><RakeTask description="" fullCmd="rails_env" taksId="rails_env" /></RakeGroup></Settings>
View
5 .idea/encodings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
+</project>
+
View
11 .idea/misc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="DependencyValidationManager">
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </component>
+ <component name="ProjectResources">
+ <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
+ </component>
+ <component name="ProjectRootManager" version="2" project-jdk-name="Ruby SDK 1.8.7-p253" project-jdk-type="RUBY_SDK" />
+</project>
+
View
9 .idea/modules.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/mongoid-carrierwave-uploadify.iml" filepath="$PROJECT_DIR$/.idea/mongoid-carrierwave-uploadify.iml" />
+ </modules>
+ </component>
+</project>
+
View
189 .idea/mongoid-carrierwave-uploadify.iml
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="RUBY_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="RailsFacetType" name="Ruby on Rails">
+ <configuration>
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
+ </configuration>
+ </facet>
+ </component>
+ <component name="GemRequirementsHolder" version="3">
+ <requirement>
+ <requirement>
+ <dependency name="aws" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="bson_ext" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="carrierwave" version="0" bound="GREATER_OR_EQUAL" git="true" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="database_cleaner" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="devise" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="fabrication" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="faker" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="haml" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="haml-rails" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="jquery-rails" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="mini_magick" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="mongoid" version="2.0.0.beta.20" bound="EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="mongrel" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="rails" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="remarkable_mongoid" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="rspec-rails" version="2.0.0.beta.17" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ <requirement>
+ <requirement>
+ <dependency name="ruby-debug" version="0" bound="GREATER_OR_EQUAL" git="false" path="false" doRequire="true" />
+ </requirement>
+ <source from="Gemfile" />
+ </requirement>
+ </component>
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] bundler (v1.0.7, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.7)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] tzinfo (v0.3.23, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/tzinfo-0.3.23)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] thor (v0.14.6, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/thor-0.14.6)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] actionpack (v3.0.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] activemodel (v3.0.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/activemodel-3.0.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] database_cleaner (v0.6.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/database_cleaner-0.6.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] mongrel (v1.1.5, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/mongrel-1.1.5)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] jquery-rails (v0.2.5, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/jquery-rails-0.2.5)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] haml (v3.0.24, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/haml-3.0.24)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] aws (v2.3.26, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/aws-2.3.26)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] remarkable_mongoid (v0.5.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/remarkable_mongoid-0.5.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] ruby-debug (v0.10.4, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/ruby-debug-0.10.4)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] faker (v0.3.1, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/faker-0.3.1)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] haml-rails (v0.3.4, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/haml-rails-0.3.4)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] carrierwave (v0.5.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/carrierwave-0.5.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rspec-rails (v2.2.1, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/rspec-rails-2.2.1)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] mini_magick (v3.1, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/mini_magick-3.1)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] haml (v3.0.24, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/haml-3.0.24)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] http_connection (v1.4.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/http_connection-1.4.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] bcrypt-ruby (v2.1.2, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/bcrypt-ruby-2.1.2)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] ruby-debug-base (v0.10.4, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/ruby-debug-base-0.10.4)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] columnize (v0.3.2, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/columnize-0.3.2)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] fastthread (v1.0.7, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/fastthread-1.0.7)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] daemons (v1.1.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/daemons-1.1.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] uuidtools (v2.1.1, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/uuidtools-2.1.1)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] will_paginate (v3.0.pre2, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/will_paginate-3.0.pre2)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] subexec (v0.0.4, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/subexec-0.0.4)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] cgi_multipart_eof_fix (v2.5.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/cgi_multipart_eof_fix-2.5.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] remarkable_activemodel (v4.0.0.alpha4, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/remarkable_activemodel-4.0.0.alpha4)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] xml-simple (v1.0.12, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/xml-simple-1.0.12)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] gem_plugin (v0.2.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/gem_plugin-0.2.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rails (v3.0.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/rails-3.0.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] activerecord (v3.0.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/activerecord-3.0.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] actionpack (v3.0.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] bson (v1.1.2, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/bson-1.1.2)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] activesupport (v3.0.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] railties (v3.0.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] actionmailer (v3.0.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/actionmailer-3.0.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] activeresource (v3.0.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/activeresource-3.0.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] bson_ext (v1.1.4, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/bson_ext-1.1.4)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] devise (v1.1.5, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/devise-1.1.5)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] fabrication (v0.9.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/fabrication-0.9.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] warden (v1.0.2, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/warden-1.0.2)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] mongo (v1.1.4, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/mongo-1.1.4)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] mongoid (v2.0.0.beta.20, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/mongoid-2.0.0.beta.20)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rake (v0.8.7, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] linecache (v0.43, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/linecache-0.43)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] arel (v2.0.6, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/arel-2.0.6)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] treetop (v1.4.9, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/treetop-1.4.9)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rack-test (v0.5.6, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/rack-test-0.5.6)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] mime-types (v1.16, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/mime-types-1.16)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] remarkable (v4.0.0.alpha4, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/remarkable-4.0.0.alpha4)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] activesupport (v3.0.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] builder (v2.1.2, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/builder-2.1.2)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] i18n (v0.4.2, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/i18n-0.4.2)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] erubis (v2.6.6, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/erubis-2.6.6)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rack (v1.2.1, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/rack-1.2.1)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] abstract (v1.0.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/abstract-1.0.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] mail (v2.2.11, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/mail-2.2.11)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] i18n (v0.5.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/i18n-0.5.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] polyglot (v0.3.1, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/polyglot-0.3.1)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rspec (v2.2.0, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/rspec-2.2.0)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] rack-mount (v0.6.13, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/rack-mount-0.6.13)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] activemodel (v3.0.3, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/activemodel-3.0.3)" level="application" />
+ <orderEntry type="library" scope="PROVIDED" name="[gem] jquery-rails (v0.2.6, /Users/jimmy/.rvm/gems/ree-1.8.7-2010.02/gems/jquery-rails-0.2.6)" level="application" />
+ </component>
+</module>
+
View
8 .idea/vcs.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="" />
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project>
+
View
653 .idea/workspace.xml
@@ -0,0 +1,653 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ChangeListManager">
+ <list default="true" id="294b333e-55f7-4c1e-b440-d9fdd450723c" name="Default" comment="">
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/photos/_form_fix.html.haml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/mongoid-carrierwave-uploadify.iml" afterPath="$PROJECT_DIR$/.idea/mongoid-carrierwave-uploadify.iml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile.lock" afterPath="$PROJECT_DIR$/Gemfile.lock" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/photos_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/photos_controller.rb" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/company.rb" afterPath="$PROJECT_DIR$/app/models/company.rb" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/photo.rb" afterPath="$PROJECT_DIR$/app/models/photo.rb" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/uploaders/image_uploader.rb" afterPath="$PROJECT_DIR$/app/uploaders/image_uploader.rb" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/companies/_form.html.haml" afterPath="$PROJECT_DIR$/app/views/companies/_form.html.haml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/companies/edit.html.haml" afterPath="$PROJECT_DIR$/app/views/companies/edit.html.haml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/companies/show.html.haml" afterPath="$PROJECT_DIR$/app/views/companies/show.html.haml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/photos/new.html.haml" afterPath="$PROJECT_DIR$/app/views/photos/new.html.haml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/config/routes.rb" afterPath="$PROJECT_DIR$/config/routes.rb" />
+ </list>
+ <ignored path="mongoid-carrierwave-uploadify.iws" />
+ <ignored path=".idea/workspace.xml" />
+ <option name="TRACKING_ENABLED" value="true" />
+ <option name="SHOW_DIALOG" value="false" />
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+ <option name="LAST_RESOLUTION" value="IGNORE" />
+ </component>
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="CreatePatchCommitExecutor">
+ <option name="PATCH_PATH" value="" />
+ <option name="REVERSE_PATCH" value="false" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="FavoritesManager">
+ <favorites_list name="mongoid-carrierwave-uploadify" />
+ </component>
+ <component name="FileColors" enabled="true" enabledForTabs="true" showNonProject="false" />
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="companies_controller.rb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/controllers/companies_controller.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="31" column="5" selection-start="537" selection-end="537" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="_form.html.haml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/views/companies/_form.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="16" column="0" selection-start="399" selection-end="399" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="image_uploader.rb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/uploaders/image_uploader.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="15" column="0" selection-start="480" selection-end="480" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="Gemfile" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/Gemfile">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="27" column="0" selection-start="491" selection-end="491" vertical-scroll-proportion="0.6087533">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="_form.html.haml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/views/photos/_form.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="1" column="19" selection-start="45" selection-end="45" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="_form_fix.html.haml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/views/photos/_form_fix.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="22" column="0" selection-start="758" selection-end="758" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="show.html.haml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/views/companies/show.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="18" column="4" selection-start="403" selection-end="403" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="new.html.haml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/views/photos/new.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="7" column="0" selection-start="181" selection-end="181" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="photos_controller.rb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/controllers/photos_controller.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="85" column="1" selection-start="1997" selection-end="1997" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="photo.rb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/models/photo.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="25" selection-start="288" selection-end="288" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="Git.Branch.Configurations">
+ <option name="CURRENT" value="master" />
+ <option name="CONFIGURATIONS">
+ <array>
+ <BranchConfiguration>
+ <option name="IS_AUTO_DETECTED" value="true" />
+ <option name="NAME" value="master" />
+ <option name="BRANCHES">
+ <array>
+ <BranchInfo>
+ <option name="ROOT" value="$PROJECT_DIR$" />
+ <option name="REFERENCE" value="master" />
+ </BranchInfo>
+ </array>
+ </option>
+ </BranchConfiguration>
+ </array>
+ </option>
+ </component>
+ <component name="Git.Settings">
+ <option name="GIT_EXECUTABLE" value="/usr/local/bin/git" />
+ <option name="CHECKOUT_INCLUDE_TAGS" value="false" />
+ <option name="UPDATE_CHANGES_POLICY" value="STASH" />
+ </component>
+ <component name="IdeDocumentHistory">
+ <option name="changedFiles">
+ <list>
+ <option value="$PROJECT_DIR$/app/models/person.rb" />
+ <option value="$PROJECT_DIR$/app/models/pet.rb" />
+ <option value="$PROJECT_DIR$/app/models/petsitter.rb" />
+ <option value="$PROJECT_DIR$/config/routes.rb" />
+ <option value="$PROJECT_DIR$/app/views/people/show.html.haml" />
+ <option value="$PROJECT_DIR$/app/controllers/pets_controller.rb" />
+ <option value="$PROJECT_DIR$/app/views/companies/edit.html.haml" />
+ <option value="$PROJECT_DIR$/app/models/company.rb" />
+ <option value="$PROJECT_DIR$/app/views/photos/_form.html.haml" />
+ <option value="$PROJECT_DIR$/app/views/photos/_form_fix.html.haml" />
+ <option value="$PROJECT_DIR$/app/views/companies/show.html.haml" />
+ <option value="$PROJECT_DIR$/app/views/photos/new.html.haml" />
+ <option value="$PROJECT_DIR$/app/views/companies/_form.html.haml" />
+ <option value="$PROJECT_DIR$/app/models/photo.rb" />
+ <option value="$PROJECT_DIR$/app/controllers/photos_controller.rb" />
+ <option value="$PROJECT_DIR$/app/uploaders/image_uploader.rb" />
+ </list>
+ </option>
+ </component>
+ <component name="LogFilters">
+ <option name="FILTER_ERRORS" value="false" />
+ <option name="FILTER_WARNINGS" value="false" />
+ <option name="FILTER_INFO" value="true" />
+ <option name="FILTER_DEBUG" value="true" />
+ <option name="CUSTOM_FILTER" />
+ </component>
+ <component name="ProjectLevelVcsManager">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <ConfirmationsSetting value="2" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ <panes>
+ <pane id="RailsProjectView" />
+ <pane id="Scope" />
+ <pane id="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="mongoid-carrierwave-uploadify" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="mongoid-carrierwave-uploadify" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="mongoid-carrierwave-uploadify" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </pane>
+ <pane id="Favorites" />
+ </panes>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="recentsLimit" value="5" />
+ </component>
+ <component name="RecentsManager">
+ <key name="CopyFile.RECENT_KEYS">
+ <recent name="$PROJECT_DIR$/app/views/companies" />
+ </key>
+ </component>
+ <component name="RunManager" selected="Rails.Development: mongoid-carrierwave-uploadify">
+ <configuration default="true" type="RakeRunConfigurationType" factoryName="Rake">
+ <module name="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="RailsRunConfigurationType" factoryName="Rails">
+ <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
+ <module name="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
+ <method />
+ </configuration>
+ <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
+ <module name="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
+ <module name="" />
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
+ <method />
+ </configuration>
+ <configuration default="true" type="JavascriptDebugSession" factoryName="Local">
+ <JSDebuggerConfigurationSettings>
+ <option name="engineId" value="embedded" />
+ <option name="fileUrl" />
+ </JSDebuggerConfigurationSettings>
+ <method />
+ </configuration>
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda">
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
+ <module name="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_CLASS_NAME" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="INHERITANCE_CHECK_DISABLED" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="false" name="test" type="RakeRunConfigurationType" factoryName="Rake">
+ <module name="mongoid-carrierwave-uploadify" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs>
+ <env name="RAILS_ENV" value="test" />
+ </envs>
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="false" name="spec" type="RakeRunConfigurationType" factoryName="Rake">
+ <module name="mongoid-carrierwave-uploadify" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
+ <method />
+ </configuration>
+ <configuration default="false" name="Production: mongoid-carrierwave-uploadify" type="RailsRunConfigurationType" factoryName="Rails">
+ <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
+ <module name="mongoid-carrierwave-uploadify" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
+ <method />
+ </configuration>
+ <configuration default="false" name="Development: mongoid-carrierwave-uploadify" type="RailsRunConfigurationType" factoryName="Rails">
+ <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
+ <module name="mongoid-carrierwave-uploadify" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
+ <envs />
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" track_test_folders="true" runner="rcov">
+ <COVERAGE_PATTERN ENABLED="true">
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
+ </COVERAGE_PATTERN>
+ </EXTENSION>
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
+ <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
+ <RunnerSettings RunnerId="RubyDebugRunner" />
+ <ConfigurationWrapper RunnerId="RubyDebugRunner" />
+ <method />
+ </configuration>
+ <list size="4">
+ <item index="0" class="java.lang.String" itemvalue="Rake.test" />
+ <item index="1" class="java.lang.String" itemvalue="Rake.spec" />
+ <item index="2" class="java.lang.String" itemvalue="Rails.Production: mongoid-carrierwave-uploadify" />
+ <item index="3" class="java.lang.String" itemvalue="Rails.Development: mongoid-carrierwave-uploadify" />
+ </list>
+ </component>
+ <component name="ShelveChangesManager" show_recycled="false" />
+ <component name="SvnConfiguration" maxAnnotateRevisions="500">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="UPDATE_RUN_STATUS" value="false" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+ <option name="DETECT_NESTED_COPIES" value="true" />
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
+ <configuration useDefault="true">$USER_HOME$/.subversion_IDEA</configuration>
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+ </component>
+ <component name="TaskManager">
+ <task active="true" id="Default" summary="Default task">
+ <changelist id="294b333e-55f7-4c1e-b440-d9fdd450723c" name="Default" comment="" />
+ <created>1291227480766</created>
+ <updated>1291227480766</updated>
+ </task>
+ <servers />
+ </component>
+ <component name="TodoView" selected-index="0">
+ <todo-panel id="selected-file">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </todo-panel>
+ <todo-panel id="all">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </todo-panel>
+ <todo-panel id="default-changelist">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </todo-panel>
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="-1440" y="0" width="1440" height="900" extended-state="0" />
+ <editor active="false" />
+ <layout>
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3297491" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3297491" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.17090395" sideWeight="0.5753228" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4246772" sideWeight="0.99876773" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3297491" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+ </layout>
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
+ <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
+ <option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
+ <option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
+ <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+ <option name="LAST_COMMIT_MESSAGE" />
+ <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+ <option name="ACTIVE_VCS_NAME" />
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+ <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+ </component>
+ <component name="XDebuggerManager">
+ <breakpoint-manager />
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/app/views/people/show.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="14" column="36" selection-start="180" selection-end="180" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/controllers/pets_controller.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="93" column="8" selection-start="1977" selection-end="1977" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/companies/edit.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="3" column="0" selection-start="37" selection-end="37" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/models/company.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="5" column="42" selection-start="148" selection-end="148" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/photos/_photo.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/models/story.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/controllers/companies_controller.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="31" column="5" selection-start="537" selection-end="537" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/companies/_form.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="16" column="0" selection-start="399" selection-end="399" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/uploaders/image_uploader.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="15" column="0" selection-start="480" selection-end="480" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/photos/_form.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="1" column="19" selection-start="45" selection-end="45" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/photos/_form_fix.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="22" column="0" selection-start="758" selection-end="758" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/companies/show.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="18" column="4" selection-start="403" selection-end="403" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/photos/new.html.haml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="7" column="0" selection-start="181" selection-end="181" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/controllers/photos_controller.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="85" column="1" selection-start="1997" selection-end="1997" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/models/photo.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="25" selection-start="288" selection-end="288" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/Gemfile">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="27" column="0" selection-start="491" selection-end="491" vertical-scroll-proportion="0.6087533">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
View
13 Gemfile
@@ -1,19 +1,16 @@
-source 'http://rubygems.org'
+source :rubygems
-gem 'rails', '3.0.5'
-
-# MongoDB
-gem 'mongoid', '2.0.0.rc.7'
+gem 'rails'
+gem 'mongrel', '1.2.0.pre2'
+gem 'mongoid', '>= 2.0.0'
gem 'bson_ext'
-
-# Template
gem 'haml'
# Authentication
gem 'devise'
# Carrierwave
-gem 'carrierwave'
+gem 'carrierwave-mongoid'
gem 'mini_magick'
gem 'fog'
View
254 Gemfile.lock
@@ -1,133 +1,155 @@
GEM
remote: http://rubygems.org/
specs:
- abstract (1.0.0)
- actionmailer (3.0.5)
- actionpack (= 3.0.5)
- mail (~> 2.2.15)
- actionpack (3.0.5)
- activemodel (= 3.0.5)
- activesupport (= 3.0.5)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.4)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.13)
- rack-test (~> 0.5.7)
- tzinfo (~> 0.3.23)
- activemodel (3.0.5)
- activesupport (= 3.0.5)
- builder (~> 2.1.2)
- i18n (~> 0.4)
- activerecord (3.0.5)
- activemodel (= 3.0.5)
- activesupport (= 3.0.5)
- arel (~> 2.0.2)
- tzinfo (~> 0.3.23)
- activeresource (3.0.5)
- activemodel (= 3.0.5)
- activesupport (= 3.0.5)
- activesupport (3.0.5)
+ actionmailer (3.2.2)
+ actionpack (= 3.2.2)
+ mail (~> 2.4.0)
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.1)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
archive-tar-minitar (0.5.2)
- arel (2.0.9)
- bcrypt-ruby (2.1.4)
- bson (1.2.4)
- bson_ext (1.2.4)
- builder (2.1.2)
- carrierwave (0.5.2)
- activesupport (~> 3.0)
- columnize (0.3.2)
- devise (1.1.7)
- bcrypt-ruby (~> 2.1.2)
- warden (~> 1.0.2)
- diff-lcs (1.1.2)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- excon (0.5.6)
- fabrication (0.9.5)
- faker (0.9.5)
+ arel (3.0.2)
+ bcrypt-ruby (3.0.1)
+ bson (1.6.1)
+ bson_ext (1.6.1)
+ bson (~> 1.6.1)
+ builder (3.0.0)
+ carrierwave (0.6.0)
+ activemodel (>= 3.2.0)
+ activesupport (>= 3.2.0)
+ carrierwave-mongoid (0.1.3)
+ carrierwave (>= 0.5.6)
+ mongoid (~> 2.1)
+ columnize (0.3.6)
+ daemons (1.0.10)
+ devise (2.0.4)
+ bcrypt-ruby (~> 3.0)
+ orm_adapter (~> 0.0.3)
+ railties (~> 3.1)
+ warden (~> 1.1.1)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ excon (0.13.2)
+ fabrication (1.3.2)
+ faker (1.0.1)
i18n (~> 0.4)
- fog (0.6.0)
+ fog (1.3.1)
builder
- excon (>= 0.5.5)
- formatador (>= 0.0.16)
- json
+ excon (~> 0.13.0)
+ formatador (~> 0.2.0)
mime-types
- net-ssh (>= 2.0.23)
- nokogiri (>= 1.4.4)
+ multi_json (~> 1.0)
+ net-scp (~> 1.0.4)
+ net-ssh (>= 2.1.3)
+ nokogiri (~> 1.5.0)
ruby-hmac
- formatador (0.0.16)
- haml (3.0.25)
+ formatador (0.2.1)
+ gem_plugin (0.2.3)
+ haml (3.1.4)
haml-rails (0.3.4)
actionpack (~> 3.0)
activesupport (~> 3.0)
haml (~> 3.0)
railties (~> 3.0)
- i18n (0.5.0)
- jquery-rails (0.2.7)
- rails (~> 3.0)
- thor (~> 0.14.4)
- json (1.5.1)
- linecache19 (0.5.11)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.3)
+ jquery-rails (2.0.1)
+ railties (>= 3.2.0, < 5.0)
+ thor (~> 0.14)
+ json (1.6.6)
+ linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
- mail (2.2.15)
- activesupport (>= 2.3.6)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.16)
- mini_magick (3.2)
- subexec (~> 0.0.4)
- mongo (1.2.4)
- bson (>= 1.2.4)
- mongoid (2.0.0.rc.7)
- activemodel (~> 3.0)
- mongo (~> 1.2)
+ mime-types (1.18)
+ mini_magick (3.4)
+ subexec (~> 0.2.1)
+ mongo (1.6.1)
+ bson (~> 1.6.1)
+ mongoid (2.4.7)
+ activemodel (~> 3.1)
+ mongo (~> 1.3)
tzinfo (~> 0.3.22)
- will_paginate (~> 3.0.pre)
- net-ssh (2.1.3)
- nokogiri (1.4.4)
- polyglot (0.3.1)
- rack (1.2.1)
- rack-mount (0.6.13)
- rack (>= 1.0.0)
- rack-test (0.5.7)
+ mongrel (1.2.0.pre2)
+ daemons (~> 1.0.10)
+ gem_plugin (~> 0.2.3)
+ multi_json (1.2.0)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-ssh (2.3.0)
+ nokogiri (1.5.2)
+ orm_adapter (0.0.7)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
rack (>= 1.0)
- rails (3.0.5)
- actionmailer (= 3.0.5)
- actionpack (= 3.0.5)
- activerecord (= 3.0.5)
- activeresource (= 3.0.5)
- activesupport (= 3.0.5)
+ rails (3.2.2)
+ actionmailer (= 3.2.2)
+ actionpack (= 3.2.2)
+ activerecord (= 3.2.2)
+ activeresource (= 3.2.2)
+ activesupport (= 3.2.2)
bundler (~> 1.0)
- railties (= 3.0.5)
- railties (3.0.5)
- actionpack (= 3.0.5)
- activesupport (= 3.0.5)
+ railties (= 3.2.2)
+ railties (3.2.2)
+ actionpack (= 3.2.2)
+ activesupport (= 3.2.2)
+ rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
- thor (~> 0.14.4)
- rake (0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
remarkable (4.0.0.alpha4)
rspec (>= 2.0.0.alpha11)
remarkable_activemodel (4.0.0.alpha4)
remarkable (~> 4.0.0.alpha4)
rspec (>= 2.0.0.alpha11)
- remarkable_mongoid (0.5.2)
+ remarkable_mongoid (0.6.0)
remarkable_activemodel (~> 4.0.0.alpha4)
- rspec (2.5.0)
- rspec-core (~> 2.5.0)
- rspec-expectations (~> 2.5.0)
- rspec-mocks (~> 2.5.0)
- rspec-core (2.5.1)
- rspec-expectations (2.5.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.5.0)
- rspec-rails (2.5.0)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- railties (~> 3.0)
- rspec (~> 2.5.0)
- ruby-debug-base19 (0.11.24)
+ rspec (2.9.0)
+ rspec-core (~> 2.9.0)
+ rspec-expectations (~> 2.9.0)
+ rspec-mocks (~> 2.9.0)
+ rspec-core (2.9.0)
+ rspec-expectations (2.9.0)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.9.0)
+ rspec-rails (2.9.0)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.9.0)
+ ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
@@ -136,23 +158,28 @@ GEM
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby-hmac (0.4.0)
- ruby_core_source (0.1.4)
+ ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
- subexec (0.0.4)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ subexec (0.2.1)
thor (0.14.6)
- treetop (1.4.9)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.24)
- warden (1.0.3)
- rack (>= 1.0.0)
- will_paginate (3.0.pre2)
+ tzinfo (0.3.32)
+ warden (1.1.1)
+ rack (>= 1.0)
PLATFORMS
ruby
DEPENDENCIES
bson_ext
- carrierwave
+ carrierwave-mongoid
devise
fabrication
faker
@@ -161,8 +188,9 @@ DEPENDENCIES
haml-rails
jquery-rails
mini_magick
- mongoid (= 2.0.0.rc.7)
- rails (= 3.0.5)
+ mongoid (>= 2.0.0)
+ mongrel (= 1.2.0.pre2)
+ rails
remarkable_mongoid
rspec-rails
ruby-debug19
View
44 app/controllers/companies_controller.rb
@@ -0,0 +1,44 @@
+class CompaniesController < ApplicationController
+ before_filter :find_or_build_company, :except => :index
+
+ def index
+ @companies = Company.all
+ end
+
+ def show
+ end
+
+ def new
+ end
+
+ def edit
+
+ end
+
+ def create
+ if @company.save
+ redirect_to @company, :notice => 'Company successfully created'
+ else
+ render :new
+ end
+ end
+
+ def update
+ if @company.update_attributes(params[:company])
+ redirect_to @company, :notice => 'Company successfully updated'
+ else
+ render :edit
+ end
+ end
+
+ def destroy
+ @company.destroy
+ redirect_to :companies
+ end
+
+private
+ def find_or_build_company
+ @company = params[:id] ? Company.find(params[:id]) : Company.new(params[:company])
+ end
+end
+
View
83 app/controllers/people_controller.rb
@@ -0,0 +1,83 @@
+class PeopleController < ApplicationController
+ # GET /people
+ # GET /people.xml
+ def index
+ @people = Person.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @people }
+ end
+ end
+
+ # GET /people/1
+ # GET /people/1.xml
+ def show
+ @person = Person.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @person }
+ end
+ end
+
+ # GET /people/new
+ # GET /people/new.xml
+ def new
+ @person = Person.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @person }
+ end
+ end
+
+ # GET /people/1/edit
+ def edit
+ @person = Person.find(params[:id])
+ end
+
+ # POST /people
+ # POST /people.xml
+ def create
+ @person = Person.new(params[:person])
+
+ respond_to do |format|
+ if @person.save
+ format.html { redirect_to(@person, :notice => 'Person was successfully created.') }
+ format.xml { render :xml => @person, :status => :created, :location => @person }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @person.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /people/1
+ # PUT /people/1.xml
+ def update
+ @person = Person.find(params[:id])
+
+ respond_to do |format|
+ if @person.update_attributes(params[:person])
+ format.html { redirect_to(@person, :notice => 'Person was successfully updated.') }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @person.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /people/1
+ # DELETE /people/1.xml
+ def destroy
+ @person = Person.find(params[:id])
+ @person.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(people_url) }
+ format.xml { head :ok }
+ end
+ end
+end
View
98 app/controllers/pets_controller.rb
@@ -0,0 +1,98 @@
+class PetsController < ApplicationController
+ # GET /pets
+ # GET /pets.xml
+ def index
+ @pets = Pet.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @pets }
+ end
+ end
+
+ # GET /pets/1
+ # GET /pets/1.xml
+ def show
+ @pet = Pet.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @pet }
+ end
+ end
+
+ # GET /pets/new
+ # GET /pets/new.xml
+ def new
+ @pet = Pet.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @pet }
+ end
+ end
+
+ # GET /pets/1/edit
+ def edit
+ @pet = Pet.find(params[:id])
+ end
+
+ # POST /pets
+ # POST /pets.xml
+ def create
+ @pet = Pet.new(params[:pet])
+
+ respond_to do |format|
+ if @pet.save
+ format.html { redirect_to(@pet, :notice => 'Pet was successfully created.') }
+ format.xml { render :xml => @pet, :status => :created, :location => @pet }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @pet.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /pets/1
+ # PUT /pets/1.xml
+ def update
+ @pet = Pet.find(params[:id])
+
+ respond_to do |format|
+ if @pet.update_attributes(params[:pet])
+ format.html { redirect_to(@pet, :notice => 'Pet was successfully updated.') }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @pet.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /pets/1
+ # DELETE /pets/1.xml
+ def destroy
+ @pet = Pet.find(params[:id])
+ @pet.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(pets_url) }
+ format.xml { head :ok }
+ end
+ end
+
+ private
+ def find_parent
+
+ @person = Person.find(params[:person_id])
+
+ end
+
+ def find_or_build_photo
+
+ if !params[:person_id].blank?
+ @pet = params[:id] ? @parent.photos.find(params[:id]) : @parent.photos.build(params[:photo])
+ end
+
+ end
+end
View
83 app/controllers/petsitters_controller.rb
@@ -0,0 +1,83 @@
+class PetsittersController < ApplicationController
+ # GET /petsitters
+ # GET /petsitters.xml
+ def index
+ @petsitters = Petsitter.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @petsitters }
+ end
+ end
+
+ # GET /petsitters/1
+ # GET /petsitters/1.xml
+ def show
+ @petsitter = Petsitter.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @petsitter }
+ end
+ end
+
+ # GET /petsitters/new
+ # GET /petsitters/new.xml
+ def new
+ @petsitter = Petsitter.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @petsitter }
+ end
+ end
+
+ # GET /petsitters/1/edit
+ def edit
+ @petsitter = Petsitter.find(params[:id])
+ end
+
+ # POST /petsitters
+ # POST /petsitters.xml
+ def create
+ @petsitter = Petsitter.new(params[:petsitter])
+
+ respond_to do |format|
+ if @petsitter.save
+ format.html { redirect_to(@petsitter, :notice => 'Petsitter was successfully created.') }
+ format.xml { render :xml => @petsitter, :status => :created, :location => @petsitter }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @petsitter.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /petsitters/1
+ # PUT /petsitters/1.xml
+ def update
+ @petsitter = Petsitter.find(params[:id])
+
+ respond_to do |format|
+ if @petsitter.update_attributes(params[:petsitter])
+ format.html { redirect_to(@petsitter, :notice => 'Petsitter was successfully updated.') }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @petsitter.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /petsitters/1
+ # DELETE /petsitters/1.xml
+ def destroy
+ @petsitter = Petsitter.find(params[:id])
+ @petsitter.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(petsitters_url) }
+ format.xml { head :ok }
+ end
+ end
+end
View
48 app/controllers/photos_controller.rb
@@ -1,9 +1,9 @@
class PhotosController < ApplicationController
- before_filter :find_story
+ before_filter :find_parent
before_filter :find_or_build_photo, :except => [:index, :sort]
def index
- redirect_to @story
+ redirect_to @parent
end
def show
@@ -18,7 +18,7 @@ def edit
def create
if @photo.save
respond_to do |format|
- format.html { redirect_to [@story, @photo], :notice => 'Photo successfully created' }
+ format.html { redirect_to [@parent, @photo], :notice => 'Photo successfully created' }
format.js
end
else
@@ -26,9 +26,10 @@ def create
end
end
+
def update
if @photo.update_attributes(params[:photo])
- redirect_to [@story, @photo], :notice => 'Photo successfully updated'
+ redirect_to [@parent, @photo], :notice => 'Photo successfully updated'
else
render :edit
end
@@ -36,29 +37,54 @@ def update
def destroy
@photo.destroy
- redirect_to @story
+ redirect_to @parent
end
def sort
# params[:photo] is an array of photo IDs in the order
# the should be set in the story. Take each ID and it's
# index in the array, find the photo with the ID and set
- # it's position to the index. Run through the whole ID
+ # it's position to the index. Run through the whole ID
# array. Mongoid will automatically do an atomic update
# of only the photos whose position has changed.
params[:photo].each_with_index do |id, idx|
- @story.photos.find(id).position = idx
+ @parent.photos.find(id).position = idx
end
- @story.save
+ @parent.save
render :nothing => true
end
+ def persisted?
+ false
+ end
private
- def find_story
- @story = Story.find(params[:story_id])
+
+
+
+ def find_parent
+ if !params[:story_id].blank?
+ @parent = Story.find(params[:story_id])
+ end
+ if !params[:product_id].blank?
+ @parent = Product.find(params[:product_id])
+ end
+ if !params[:company_id].blank?
+ @parent = Company.find(params[:company_id])
+ end
end
def find_or_build_photo
- @photo = params[:id] ? @story.photos.find(params[:id]) : @story.photos.build(params[:photo])
+ # these have many photos
+ if !params[:story_id].blank? or !params[:product_id].blank?
+ @photo = params[:id] ? @parent.photos.find(params[:id]) : @parent.photos.build(params[:photo])
+ #raise @photo.inspect
+ end
+ # these have many photos
+ if !params[:company_id].blank?
+ #raise params.inspect
+ @photo = @parent.photo ? @parent.photo : @parent.build_photo(params[:photo])
+
+ end
end
end
+
View
43 app/controllers/products_controller.rb
@@ -0,0 +1,43 @@
+class ProductsController < ApplicationController
+ before_filter :find_or_build_product, :except => :index
+
+ def index
+ @products = Product.all
+ end
+
+ def show
+ end
+
+ def new
+ end
+
+ def edit
+ end
+
+ def create
+ if @product.save
+ redirect_to @product, :notice => 'Product successfully created'
+ else
+ render :new
+ end
+ end
+
+ def update
+ if @product.update_attributes(params[:product])
+ redirect_to @product, :notice => 'Product successfully updated'
+ else
+ render :edit
+ end
+ end
+
+ def destroy
+ @product.destroy
+ redirect_to :products
+ end
+
+private
+ def find_or_build_product
+ @product = params[:id] ? Product.find(params[:id]) : Product.new(params[:product])
+ end
+end
+
View
30 app/helpers/application_helper.rb
@@ -1,5 +1,7 @@
module ApplicationHelper
- def photo_uploadify
+
+
+ def photo_uploadify (has)
# Putting the uploadify trigger script in the helper gives us
# full access to the view and native rails objects without having
# to set javascript variables.
@@ -13,26 +15,40 @@ def photo_uploadify
# ScriptData:
# Sets the http headers to accept javascript plus adds
# the session key and authenticity token for XSS protection.
- # The "FlashSessionCookieMiddleware" rack module deconstructs these
+ # The "FlashSessionCookieMiddleware" rack module deconstructs these
# parameters into something Rails will actually use.
+
+ cs = controller_name.singularize
+ script_path = controller.send(cs+ "_photos_path", instance_variable_get("@#{cs}") )
+ if (has =="many")
+ multi = "true"
+ else
+ multi = "false"
+ end
+
session_key_name = Rails.application.config.session_options[:key]
%Q{
<script type='text/javascript'>
$(document).ready(function() {
+
+
$('#photo_upload').uploadify({
- script : '#{story_photos_path(@story)}',
+ script : '#{script_path}',
fileDataName : 'photo[image]',
uploader : '/uploadify/uploadify.swf',
cancelImg : '/uploadify/cancel.png',
+ buttonImg : '/images/pic-upload.png',
fileDesc : 'Images',
fileExt : '*.png;*.jpg;*.gif',
sizeLimit : #{10.megabytes},
queueSizeLimit : 24,
- multi : true,
+ width : 196,
+ height : 35,
+ multi : #{multi},
auto : true,
- buttonText : 'ADD IMAGES',
+ buttonText : 'Bilder hochladen',
scriptData : {
'_http_accept': 'application/javascript',
'#{session_key_name}' : encodeURIComponent('#{u(cookies[session_key_name])}'),
@@ -47,6 +63,8 @@ def photo_uploadify
end
def photo_sortable
+ cs = controller_name.singularize
+ script_path=controller.send("sort_" + cs+ "_photos_path", instance_variable_get("@#{cs}") )
%Q{
<script type="text/javascript">
$(document).ready(function() {
@@ -60,7 +78,7 @@ def photo_sortable
type: 'post',
data: $('#sortable').sortable('serialize') + '&authenticity_token=#{u(form_authenticity_token)}',
dataType: 'script',
- url: '#{sort_story_photos_path(@story)}'})
+ url: '#{script_path}'})
}
});
});
View
2  app/helpers/companies_helper.rb
@@ -0,0 +1,2 @@
+module CompaniesHelper
+end
View
2  app/helpers/people_helper.rb
@@ -0,0 +1,2 @@
+module PeopleHelper
+end
View
2  app/helpers/pets_helper.rb
@@ -0,0 +1,2 @@
+module PetsHelper
+end
View
2  app/helpers/petsitters_helper.rb
@@ -0,0 +1,2 @@
+module PetsittersHelper
+end
View
2  app/helpers/products_helper.rb
@@ -0,0 +1,2 @@
+module ProductsHelper
+end
View
9 app/models/company.rb
@@ -0,0 +1,9 @@
+class Company
+ include Mongoid::Document
+ field :name, :type => String
+ field :founded, :type => Date
+
+ embeds_one :photo, :as => :array
+
+ accepts_nested_attributes_for :photo
+end
View
9 app/models/person.rb
@@ -0,0 +1,9 @@
+class Person
+ include Mongoid::Document
+ field :name, :type => String
+ field :age, :type => Integer
+
+ embeds_many :pets
+ embeds_one :petsitter
+
+end
View
7 app/models/pet.rb
@@ -0,0 +1,7 @@
+class Pet
+ include Mongoid::Document
+ field :name, :type => String
+ field :kind, :type => String
+
+ embedded_in :person, :inverse_of => :pets
+end
View
6 app/models/petsitter.rb
@@ -0,0 +1,6 @@
+class Petsitter
+ include Mongoid::Document
+ field :name, :type => String
+
+ embedded_in :person, :inverse_of => :petsitter
+end
View
8 app/models/photo.rb
@@ -1,4 +1,4 @@
-require 'carrierwave/orm/mongoid'
+# require 'carrierwave/orm/mongoid'
class Photo
include Mongoid::Document
@@ -8,7 +8,9 @@ class Photo
field :height, :type => Integer
field :orientation
field :position, :type => Integer, :default => 0
- embedded_in :story, :inverse_of => :photos
+
+ embedded_in :photosable, :inverse_of => :photos
+ embedded_in :photoable, :inverse_of => :photo
# CarrierWave
mount_uploader :image, ImageUploader
@@ -35,6 +37,6 @@ def save_orientation
end
def save_position
- self.position = (self._index + 1) if self.new_record?
+ # self.position = (self._index + 1) if self.new_record?
end
end
View
9 app/models/product.rb
@@ -0,0 +1,9 @@
+class Product
+ include Mongoid::Document
+ field :name, :type => String
+ field :price, :type => Integer
+ field :description, :type => String
+
+ embeds_many :photos
+
+end
View
5 app/uploaders/image_uploader.rb
@@ -14,10 +14,13 @@ class ImageUploader < CarrierWave::Uploader::Base
# storage :file
# storage :s3
+
# Override the directory where uploaded files will be stored
# This is a sensible default for uploaders that are meant to be mounted:
def store_dir
- "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
+ path = model.photoable.nil? ? model.photoable.class.to_s.underscore : model.photosable.class.to_s.underscore
+puts path + "---------------"
+ "uploads/#{path}/#{mounted_as}/#{model.id}"
end
# Provide a default URL as a default if there hasn't been a file uploaded
View
16 app/views/companies/_form.html.haml
@@ -0,0 +1,16 @@
+= form_for @company do |f|
+ -if @company.errors.any?
+ #errorExplanation
+ %h2= "#{pluralize(@company.errors.count, "error")} prohibited this @company from being saved:"
+ %ul
+ - @company.errors.full_messages.each do |msg|
+ %li= msg
+
+ .field
+ = f.label :name
+ = f.text_field :name
+ .field
+ = f.label :founded
+ = f.date_select :founded
+
+ = f.submit <