Permalink
Browse files

readme update

  • Loading branch information...
1 parent 0047c8b commit a7af524406dcae954fe21c3fb13033d4d8e2e32c @mustafaturan committed Aug 24, 2012
Showing with 21 additions and 37 deletions.
  1. +4 −2 MIT-LICENSE
  2. +0 −29 README.md
  3. +17 −6 README.rdoc
View
@@ -1,4 +1,6 @@
-Copyright 2012 MUSTAFA TURAN
+Copyright (c) 2012 Mustafa TURAN
+
+MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -17,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,29 +0,0 @@
-# FindCache
-
-TODO: Write a gem description
-
-## Installation
-
-Add this line to your application's Gemfile:
-
- gem 'find_cache'
-
-And then execute:
-
- $ bundle
-
-Or install it yourself as:
-
- $ gem install find_cache
-
-## Usage
-
-TODO: Write usage instructions here
-
-## Contributing
-
-1. Fork it
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Commit your changes (`git commit -am 'Added some feature'`)
-4. Push to the branch (`git push origin my-new-feature`)
-5. Create new Pull Request
View
@@ -23,15 +23,23 @@ Or install it yourself as:
### Sample Models:
User (`has_one :user_detail`) ->
-`find_cache_has_one :user_detail, UserDetail, :user_id`
-`find_cache_has_one attr_name_or_any_other_name, ModelName, foreign_key`
+`
+find_cache_has_one :user_detail, UserDetail, :user_id
+`
+`
+find_cache attr_name_or_any_other_name, ModelName, foreign_key
+`
+- name
- email
- username
-- password
UserDetail (`belongs_to :user`) ->
-`find_cache_belongs_to :user, User, :user_id`
-`find_cache_belongs_to attr_name_or_any_other_name, ModelName, foreign_key`
+`
+find_cache_belongs_to :user, User, :user_id
+`
+`
+find_cache attr_name_or_any_other_name, ModelName, foreign_key
+`
- user_id
- avatar
- age
@@ -43,6 +51,7 @@ UserDetail (`belongs_to :user`) ->
### Create a ruby file under config/initializers and add the following codes:
`
+
module ActiveRecord
module CounterCache
def increment_counter(counter_name, id)
@@ -62,14 +71,16 @@ module ActiveRecord
end
end
end
+
`
## Notes
Tested with dalli (https://github.com/mperham/dalli).
## Credits
-FindCache is part of http://videofork.com/ project.
+
+FindCache is part of http://videofork.com project.
## Contributing

0 comments on commit a7af524

Please sign in to comment.