acts_as_metable 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f84b54d521eaa01f369fce7f7aa3e45538d5cf8a
4
- data.tar.gz: b0f1a922cc91c2508f02fad1b38d9a6680f79097
3
+ metadata.gz: c4fde97be2ab1080457824a617aaf8cd91acaeeb
4
+ data.tar.gz: 180ede078992c92f479772f33a531ebcdb19fdb1
5
5
  SHA512:
6
- metadata.gz: 54a3d51a21126d7d571ff25769b98aeb05558321421f621bcb10b89f63498b022e7edce78f14f37a0ee981edeb31465b6f54067fd5f180f0cbb499fe090c0d13
7
- data.tar.gz: 28a7e993b5200bd82e0ccebec35c9d35b4f4e5cf8b1383589be60386c381b4c74b15855e42151fe4f795cab93e9ec3df51dac169de33abb24e571b1ea5ea7d8b
6
+ metadata.gz: 605bde5e4d15d0d86233c31512c7690852e10247ceccc738dbc6005200990569e582eff7358b425e182b7ffb16d872be12d7e2ffbc88fad2eaae87ad43938bfd
7
+ data.tar.gz: e911fef4978f1f3e6dc4ef9d1f4291fab562fca85bf480026ceff048beef7a080995cdee6bfdd4f7837e838782a7610290fb090771a5592bec087dbe1d968ce4
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Acts As Metable
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/acts_as_metable.svg)](http://badge.fury.io/rb/acts_as_metable)
4
+ [![Code Climate](https://codeclimate.com/github/droptheplot/acts_as_metable/badges/gpa.svg)](https://codeclimate.com/github/droptheplot/acts_as_metable)
5
+
6
+ Meta tags from polymorphic model
7
+
8
+ ## Getting started
9
+
10
+ Add gem to your Gemfile
11
+
12
+ ```ruby
13
+ gem 'acts_as_metable'
14
+ ```
15
+
16
+ Bundle it
17
+
18
+ ```shell
19
+ bundle install
20
+ ```
21
+
22
+ Run the installer
23
+
24
+ ```shell
25
+ rails g acts_as_metable:install
26
+ ```
27
+
28
+ Then migrations
29
+ ```shell
30
+ rake db:migrate
31
+ ```
32
+
33
+ Add `acts_as_metable` method to your model
34
+
35
+ ```ruby
36
+ class Page < ActiveRecord::Base
37
+ acts_as_metable
38
+ end
39
+ ```
@@ -1,8 +1,8 @@
1
- module ActsAsMetable
1
+ module ::ActsAsMetable
2
2
  module Metable
3
3
  def acts_as_metable
4
4
  class_eval do
5
- has_many :meta_tags, as: :metable, dependent: :destroy, class_name: '::ActsAsMetable::Tag', :foreign_key => :metable_id
5
+ has_many :meta_tags, dependent: :destroy, class_name: '::ActsAsMetable::Tag', :foreign_key => :metable_id
6
6
  end
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module ActsAsMetable
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_metable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Novikov
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - MIT-LICENSE
49
+ - README.md
49
50
  - Rakefile
50
51
  - app/models/acts_as_metable/tag.rb
51
52
  - db/migrate/20150913104251_create_acts_as_metable_tags.rb