README.md in my_feeds-0.0.1 vs README.md in my_feeds-0.1.0

- old
+ new

@@ -1,13 +1,11 @@ # MyFeeds -------------------------------------- Help you implement feeds / timeline in rails application. ## Installation ------------------------------------- Add this line to your application's Gemfile: gem 'my_feeds' And then execute: @@ -18,17 +16,14 @@ $ gem install my_feeds ## Usage ------------------------------------- ####before usage -my_feeds need three type model at least +my_feeds need `feeder`, `eater` and associate model -`feeder`, `eater` and associate model - feeder publish feeds eater receive publish and associate model create a relation between feeder and eater @@ -48,16 +43,21 @@ just make sure your model have a polymorphic field for feeder. and ``` -class YourModel < ActiveRecord::Base +class YourCustomModel < ActiveRecord::Base include MyFeeds::Identify #make sure include this module - self.feed_polymorphic_name = :xxx #and set this, in this case is xxx, same with polymorphic belongs_to + self.feed_polymorphic = :likeable #and set this, in this case is likeable, it should same as the polymorphic belongs_to - belongs_to :xxx, polymorphic: true + #same as self.feed_polymorphic + belongs_to :likeable, polymorphic: true end + +# you should create a migration like below +# in this case, this column name is likeable_identify, it depends on feed_polymorphic +#add_column :your_customs, :likeable_identify, :string, null: false ``` ####feeder include MyFeeds::Feeder in your model which will as feed source @@ -163,10 +163,9 @@ end ``` ## Contributing -------------------- 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`)