Permalink
Browse files

bump to version 0.2

  • Loading branch information...
1 parent 05368c1 commit 0ae9c54f6e806c6abcb58ba61d536888cbff66bc @Draiken committed May 9, 2011
Showing with 18,339 additions and 114 deletions.
  1. +1 −1 Gemfile.lock
  2. +57 −2 README.rdoc
  3. +233 −0 doc/ActionDispatch.html
  4. +236 −0 doc/ActionDispatch/Routing.html
  5. +286 −0 doc/ActionDispatch/Routing/Mapper.html
  6. +322 −0 doc/ApplicationController.html
  7. +227 −0 doc/ApplicationHelper.html
  8. +234 −0 doc/Comment.html
  9. +323 −0 doc/CreateComments.html
  10. +324 −0 doc/CreatePosts.html
  11. +323 −0 doc/CreateUsers.html
  12. +236 −0 doc/Dummy.html
  13. +234 −0 doc/Dummy/Application.html
  14. +208 −0 doc/Gemfile.html
  15. +199 −0 doc/MIT-LICENSE.html
  16. +304 −0 doc/NavigationHelpers.html
  17. +449 −0 doc/Opinio.html
  18. +385 −0 doc/Opinio/CommentsController.html
  19. +254 −0 doc/Opinio/Controllers.html
  20. +238 −0 doc/Opinio/Controllers/Extensions.html
  21. +276 −0 doc/Opinio/Controllers/Extensions/ClassMethods.html
  22. +276 −0 doc/Opinio/Controllers/Extensions/InstanceMethods.html
  23. +349 −0 doc/Opinio/Controllers/Helpers.html
  24. +390 −0 doc/Opinio/Controllers/InternalHelpers.html
  25. +320 −0 doc/Opinio/Controllers/Replies.html
  26. +234 −0 doc/Opinio/Engine.html
  27. +241 −0 doc/Opinio/Generators.html
  28. +412 −0 doc/Opinio/Generators/InstallGenerator.html
  29. +283 −0 doc/Opinio/Generators/ViewsGenerator.html
  30. +287 −0 doc/Opinio/OpinioModel.html
  31. +345 −0 doc/Opinio/OpinioModel/ClassMethods.html
  32. +335 −0 doc/Opinio/OpinioModel/InstanceMethods.html
  33. +287 −0 doc/Opinio/OpinioSubjectum.html
  34. +285 −0 doc/Opinio/OpinioSubjectum/ClassMethods.html
  35. +227 −0 doc/Opinio/OpinioSubjectum/InstanceMethods.html
  36. +236 −0 doc/Opinio/Orm.html
  37. +236 −0 doc/Opinio/Orm/ActiveRecord.html
  38. +289 −0 doc/Opinio/Orm/ActiveRecord/Schema.html
  39. +234 −0 doc/Opinio/Railtie.html
  40. +321 −0 doc/Opinio/Schema.html
  41. +234 −0 doc/Post.html
  42. +554 −0 doc/PostsController.html
  43. +227 −0 doc/PostsHelper.html
  44. +227 −0 doc/README_rdoc.html
  45. +217 −0 doc/Rakefile.html
  46. +234 −0 doc/User.html
  47. +554 −0 doc/UsersController.html
  48. +227 −0 doc/UsersHelper.html
  49. +315 −0 doc/WithinHelpers.html
  50. +52 −0 doc/app/controllers/opinio/comments_controller_rb.html
  51. +52 −0 doc/config/routes_rb.html
  52. +2 −0 doc/created.rid
  53. +52 −0 doc/features/step_definitions/common_steps_rb.html
  54. +52 −0 doc/features/step_definitions/remove_comment_steps_rb.html
  55. +75 −0 doc/features/support/env_rb.html
  56. +54 −0 doc/index.html
  57. +52 −0 doc/lib/generators/opinio/install/install_generator_rb.html
  58. +52 −0 doc/lib/generators/opinio/install/templates/models/model_rb.html
  59. +52 −0 doc/lib/generators/opinio/views/views_generator_rb.html
  60. +52 −0 doc/lib/opinio/controllers/extensions_rb.html
  61. +52 −0 doc/lib/opinio/controllers/helpers_rb.html
  62. +52 −0 doc/lib/opinio/controllers/internal_helpers_rb.html
  63. +52 −0 doc/lib/opinio/controllers/replies_rb.html
  64. +52 −0 doc/lib/opinio/opinio_model_rb.html
  65. +52 −0 doc/lib/opinio/opinio_subjectum_rb.html
  66. +54 −0 doc/lib/opinio/orm/active_record_rb.html
  67. +52 −0 doc/lib/opinio/rails/routes_rb.html
  68. +52 −0 doc/lib/opinio/rails_rb.html
  69. +54 −0 doc/lib/opinio/railtie_rb.html
  70. +52 −0 doc/lib/opinio/schema_rb.html
  71. +52 −0 doc/lib/opinio_rb.html
  72. +706 −0 doc/rdoc.css
  73. +186 −0 doc/spec/dummy/Rakefile.html
  74. +52 −0 doc/spec/dummy/app/controllers/application_controller_rb.html
  75. +52 −0 doc/spec/dummy/app/controllers/posts_controller_rb.html
  76. +52 −0 doc/spec/dummy/app/controllers/users_controller_rb.html
  77. +52 −0 doc/spec/dummy/app/helpers/application_helper_rb.html
  78. +52 −0 doc/spec/dummy/app/helpers/posts_helper_rb.html
  79. +52 −0 doc/spec/dummy/app/helpers/users_helper_rb.html
  80. +52 −0 doc/spec/dummy/app/models/comment_rb.html
  81. +52 −0 doc/spec/dummy/app/models/post_rb.html
  82. +52 −0 doc/spec/dummy/app/models/user_rb.html
  83. +64 −0 doc/spec/dummy/config/application_rb.html
  84. +56 −0 doc/spec/dummy/config/boot_rb.html
  85. +55 −0 doc/spec/dummy/config/environment_rb.html
  86. +52 −0 doc/spec/dummy/config/environments/development_rb.html
  87. +52 −0 doc/spec/dummy/config/environments/production_rb.html
  88. +52 −0 doc/spec/dummy/config/environments/test_rb.html
  89. +55 −0 doc/spec/dummy/config/initializers/backtrace_silencers_rb.html
  90. +55 −0 doc/spec/dummy/config/initializers/inflections_rb.html
  91. +55 −0 doc/spec/dummy/config/initializers/mime_types_rb.html
  92. +52 −0 doc/spec/dummy/config/initializers/opinio_rb.html
  93. +55 −0 doc/spec/dummy/config/initializers/secret_token_rb.html
  94. +55 −0 doc/spec/dummy/config/initializers/session_store_rb.html
  95. +52 −0 doc/spec/dummy/config/routes_rb.html
  96. +52 −0 doc/spec/dummy/db/migrate/20110401180341_create_posts_rb.html
  97. +52 −0 doc/spec/dummy/db/migrate/20110401180356_create_users_rb.html
  98. +52 −0 doc/spec/dummy/db/migrate/20110401185623_create_comments_rb.html
  99. +70 −0 doc/spec/dummy/db/schema_rb.html
  100. +65 −0 doc/spec/dummy/features/step_definitions/web_steps_rb.html
  101. +77 −0 doc/spec/dummy/features/support/env_rb.html
  102. +52 −0 doc/spec/dummy/features/support/paths_rb.html
  103. +56 −0 doc/spec/dummy/script/cucumber.html
  104. +58 −0 doc/spec/dummy/script/rails.html
  105. +54 −0 doc/spec/integration/navigation_spec_rb.html
  106. +56 −0 doc/spec/opinio_model_spec_rb.html
  107. +54 −0 doc/spec/opinio_spec_rb.html
  108. +56 −0 doc/spec/opinio_subjectum_spec_rb.html
  109. +54 −0 doc/spec/shared_examples_rb.html
  110. +63 −0 doc/spec/spec_helper_rb.html
  111. +1 −1 opinio.gemspec
  112. +2 −0 rdoc/ActionDispatch.html
  113. +2 −0 rdoc/ActionDispatch/Routing.html
  114. +3 −1 rdoc/ActionDispatch/Routing/Mapper.html
  115. +54 −16 rdoc/Opinio.html
  116. +2 −0 rdoc/Opinio/Controllers.html
  117. +4 −0 rdoc/Opinio/Controllers/Extensions.html
  118. +6 −4 rdoc/Opinio/Controllers/Extensions/ClassMethods.html
  119. +234 −0 rdoc/Opinio/Controllers/Extensions/InstanceMethods.html
  120. +2 −0 rdoc/Opinio/Controllers/Helpers.html
  121. +2 −0 rdoc/Opinio/Controllers/InternalHelpers.html
  122. +9 −6 rdoc/Opinio/Controllers/Replies.html
  123. +2 −0 rdoc/Opinio/Engine.html
  124. +2 −0 rdoc/Opinio/Generators.html
  125. +2 −0 rdoc/Opinio/Generators/InstallGenerator.html
  126. +2 −0 rdoc/Opinio/Generators/ViewsGenerator.html
  127. +2 −0 rdoc/Opinio/OpinioModel.html
  128. +73 −41 rdoc/Opinio/OpinioModel/ClassMethods.html
  129. +35 −29 rdoc/Opinio/OpinioModel/InstanceMethods.html
  130. +2 −0 rdoc/Opinio/OpinioSubjectum.html
  131. +2 −0 rdoc/Opinio/OpinioSubjectum/ClassMethods.html
  132. +2 −0 rdoc/Opinio/OpinioSubjectum/InstanceMethods.html
  133. +2 −0 rdoc/Opinio/Orm.html
  134. +2 −0 rdoc/Opinio/Orm/ActiveRecord.html
  135. +2 −0 rdoc/Opinio/Orm/ActiveRecord/Schema.html
  136. +2 −0 rdoc/Opinio/Railtie.html
  137. +2 −0 rdoc/Opinio/Schema.html
  138. +77 −1 rdoc/README_rdoc.html
  139. +7 −7 rdoc/created.rid
  140. +6 −0 rdoc/index.html
  141. +1 −1 rdoc/lib/opinio/controllers/extensions_rb.html
  142. +1 −1 rdoc/lib/opinio/controllers/replies_rb.html
  143. +1 −1 rdoc/lib/opinio/opinio_model_rb.html
  144. +1 −1 rdoc/lib/opinio/rails/routes_rb.html
  145. +1 −1 rdoc/lib/opinio_rb.html
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- opinio (0.0.1)
+ opinio (0.0.2)
GEM
remote: http://rubygems.org/
View
@@ -15,11 +15,10 @@ and run:
bundle
-
== Documentation
Rdocs here:
- {http://rubydoc.info/github/Draiken/opinio/master/frames}[http://rubydoc.info/github/Draiken/opinio/master/frames]
+ http://rubydoc.info/github/Draiken/opinio/master/frames
== Usage
@@ -42,20 +41,76 @@ Now in your view, where the comments will be displayed, you simply add:
<%= comments_for @post %>
And theere you go, you can now comment in your post.
+Aditional options can be found on the {RDocs}[http://rubydoc.info/github/Draiken/opinio/master/frames]
== Customization
+=== Views
+
Of course you will want to customize how the comments are displayed or any other customization to the view. To generate the view files on your application, run:
rails g opinio:views
And you can customize all the views used by the engine.
+=== Behaviour
+
+==== Pretty Urls
+
+Often times you will want the engine to show the index of comments for a specific item
+without having to pass +:commentable_type+ or +:commentable_id+.
+
+In order to do that, opinio provides a method to +ActionController::Base+:
+
+ opinio_identifier do |params|
+ return Review.find(params[:review_id]) if params[:review_id]
+ return Product.find(params[:product_id]) if params[:product_id]
+ end
+
+Basically on this method you receive the +params+ variable and you tell the engine, who owns
+the comments from that page.
+This allows you to use routes like:
+
+ /products/1/comments
+ /products/1/reviews/1/comments
+
+Without passing those 2 parameters.
+I suggest you put this method on the +ApplicationController+
+
+==== Customize destroy conditions
+
+By default, anyone can destroy any comment in the engine. We don't want that.
+To setup a custom destroy condition we can use the methods provided by opinio
+in our controllers. For instance, if our opinio model is called 'comment'
+it would be like this:
+
+ comment_destroy_conditions do |comment|
+ comment.owner == current_user
+ end
+
+This would make users only be able to remove their own comments.
+Another example would be using the +CanCan+:
+
+ comment_destroy_conditions do |comment|
+ authorize :destroy, comment
+ end
+
+You get the picture, you're inside your controller's methods on that block
+so you can call anything your normal controllers call on actions.
+
== Contribution
If you want to help in any way with *Opinio* please message me or fork the project, make the changes and send me a pull request.
For issues please use the github {issues tracker}[https://github.com/Draiken/opinio/issues]
Remember this engine is still in development :)
+=== TODO
+ * Haml views
+ * Better controller overriding (coding and documentation)
+ * Support for deeper levels of replies
+ * Add tons of rspecs for
+ * controllers
+ * routes
+ * models
View
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+
+ <title>Module: ActionDispatch</title>
+
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
+
+ <script src="./js/jquery.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="./js/quicksearch.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="./js/darkfish.js" type="text/javascript"
+ charset="utf-8"></script>
+
+</head>
+<body class="module">
+
+ <div id="metadata">
+ <div id="home-metadata">
+ <div id="home-section" class="section">
+ <h3 class="section-header">
+ <a href="./index.html">Home</a>
+ <a href="./index.html#classes">Classes</a>
+ <a href="./index.html#methods">Methods</a>
+ </h3>
+ </div>
+ </div>
+
+ <div id="file-metadata">
+ <div id="file-list-section" class="section">
+ <h3 class="section-header">In Files</h3>
+ <div class="section-body">
+ <ul>
+
+ </ul>
+ </div>
+ </div>
+
+
+ </div>
+
+ <div id="class-metadata">
+
+ <!-- Parent Class -->
+
+
+ <!-- Namespace Contents -->
+
+ <div id="namespace-list-section" class="section">
+ <h3 class="section-header">Namespace</h3>
+ <ul class="link-list">
+
+ <li><span class="type">MODULE</span> <a href="ActionDispatch/Routing.html">ActionDispatch::Routing</a></li>
+
+ </ul>
+ </div>
+
+
+ <!-- Method Quickref -->
+
+
+ <!-- Included Modules -->
+
+ </div>
+
+ <div id="project-metadata">
+
+
+ <div id="fileindex-section" class="section project-section">
+ <h3 class="section-header">Files</h3>
+ <ul>
+
+ <li class="file"><a href="./Gemfile.html">Gemfile</a></li>
+
+ <li class="file"><a href="./MIT-LICENSE.html">MIT-LICENSE</a></li>
+
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
+
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
+
+ <li class="file"><a href="./spec/dummy/Rakefile.html">Rakefile</a></li>
+
+ </ul>
+ </div>
+
+
+ <div id="classindex-section" class="section project-section">
+ <h3 class="section-header">Class Index
+ <span class="search-toggle"><img src="./images/find.png"
+ height="16" width="16" alt="[+]"
+ title="show/hide quicksearch" /></span></h3>
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
+ <fieldset>
+ <legend>Quicksearch</legend>
+ <input type="text" name="quicksearch" value=""
+ class="quicksearch-field" />
+ </fieldset>
+ </form>
+
+ <ul class="link-list">
+
+ <li><a href="./Opinio.html">Opinio</a></li>
+
+ <li><a href="./Opinio/CommentsController.html">Opinio::CommentsController</a></li>
+
+ <li><a href="./Opinio/Controllers.html">Opinio::Controllers</a></li>
+
+ <li><a href="./Opinio/Controllers/Extensions.html">Opinio::Controllers::Extensions</a></li>
+
+ <li><a href="./Opinio/Controllers/Extensions/ClassMethods.html">Opinio::Controllers::Extensions::ClassMethods</a></li>
+
+ <li><a href="./Opinio/Controllers/Extensions/InstanceMethods.html">Opinio::Controllers::Extensions::InstanceMethods</a></li>
+
+ <li><a href="./Opinio/Controllers/Helpers.html">Opinio::Controllers::Helpers</a></li>
+
+ <li><a href="./Opinio/Controllers/InternalHelpers.html">Opinio::Controllers::InternalHelpers</a></li>
+
+ <li><a href="./Opinio/Controllers/Replies.html">Opinio::Controllers::Replies</a></li>
+
+ <li><a href="./Opinio/Engine.html">Opinio::Engine</a></li>
+
+ <li><a href="./Opinio/Generators.html">Opinio::Generators</a></li>
+
+ <li><a href="./Opinio/Generators/InstallGenerator.html">Opinio::Generators::InstallGenerator</a></li>
+
+ <li><a href="./Opinio/Generators/ViewsGenerator.html">Opinio::Generators::ViewsGenerator</a></li>
+
+ <li><a href="./Opinio/OpinioModel.html">Opinio::OpinioModel</a></li>
+
+ <li><a href="./Opinio/OpinioModel/ClassMethods.html">Opinio::OpinioModel::ClassMethods</a></li>
+
+ <li><a href="./Opinio/OpinioModel/InstanceMethods.html">Opinio::OpinioModel::InstanceMethods</a></li>
+
+ <li><a href="./Opinio/OpinioSubjectum.html">Opinio::OpinioSubjectum</a></li>
+
+ <li><a href="./Opinio/OpinioSubjectum/ClassMethods.html">Opinio::OpinioSubjectum::ClassMethods</a></li>
+
+ <li><a href="./Opinio/OpinioSubjectum/InstanceMethods.html">Opinio::OpinioSubjectum::InstanceMethods</a></li>
+
+ <li><a href="./Opinio/Orm.html">Opinio::Orm</a></li>
+
+ <li><a href="./Opinio/Orm/ActiveRecord.html">Opinio::Orm::ActiveRecord</a></li>
+
+ <li><a href="./Opinio/Orm/ActiveRecord/Schema.html">Opinio::Orm::ActiveRecord::Schema</a></li>
+
+ <li><a href="./Opinio/Schema.html">Opinio::Schema</a></li>
+
+ <li><a href="./ActionDispatch.html">ActionDispatch</a></li>
+
+ <li><a href="./ActionDispatch/Routing.html">ActionDispatch::Routing</a></li>
+
+ <li><a href="./ActionDispatch/Routing/Mapper.html">ActionDispatch::Routing::Mapper</a></li>
+
+ <li><a href="./Dummy.html">Dummy</a></li>
+
+ <li><a href="./Dummy/Application.html">Dummy::Application</a></li>
+
+ <li><a href="./ApplicationController.html">ApplicationController</a></li>
+
+ <li><a href="./ApplicationHelper.html">ApplicationHelper</a></li>
+
+ <li><a href="./Comment.html">Comment</a></li>
+
+ <li><a href="./CreateComments.html">CreateComments</a></li>
+
+ <li><a href="./CreatePosts.html">CreatePosts</a></li>
+
+ <li><a href="./CreateUsers.html">CreateUsers</a></li>
+
+ <li><a href="./NavigationHelpers.html">NavigationHelpers</a></li>
+
+ <li><a href="./Post.html">Post</a></li>
+
+ <li><a href="./PostsController.html">PostsController</a></li>
+
+ <li><a href="./PostsHelper.html">PostsHelper</a></li>
+
+ <li><a href="./User.html">User</a></li>
+
+ <li><a href="./UsersController.html">UsersController</a></li>
+
+ <li><a href="./UsersHelper.html">UsersHelper</a></li>
+
+ <li><a href="./WithinHelpers.html">WithinHelpers</a></li>
+
+ </ul>
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
+ </div>
+
+
+ </div>
+ </div>
+
+ <div id="documentation">
+ <h1 class="module">ActionDispatch</h1>
+
+ <div id="description">
+
+ </div>
+
+ <!-- Constants -->
+
+
+ <!-- Attributes -->
+
+
+ <!-- Methods -->
+
+
+ </div>
+
+
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
+
+ <p>Disabled; run with --debug to generate this.</p>
+
+ </div>
+
+ <div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
+ Rdoc Generator</a> 1.1.6</small>.</p>
+ </div>
+
+</body>
+</html>
+
Oops, something went wrong.

0 comments on commit 0ae9c54

Please sign in to comment.