due_credit 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -1,8 +1,8 @@
1
- # DueCredit
1
+ #== DueCredit
2
2
 
3
3
  A rails engine to give credit to your users for referring people back to your site. For instance if you have someone sign up, you give them a unique link back to your site for them to share on Twitter, Facebook, Emails, etc.
4
4
 
5
- ## Installation
5
+ ##== Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
@@ -16,15 +16,15 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install due_credit
18
18
 
19
- ## Usage
19
+ ##== Usage
20
20
 
21
- # Generate the migrations
21
+ Generate the migrations
22
22
 
23
23
  $ bundle exec rails g due_credit
24
24
 
25
- # Run the migration. This should create the following tables: Campaigns, Referrers, Referrals
25
+ Run the migration. This should create the following tables: Campaigns, Referrers, Referrals
26
26
 
27
- # From your app
27
+ From your app
28
28
 
29
29
  DueCredit::Campaign.create!(name: 'something', threshold: 5, endpoint: '/welcome')
30
30
  DueCredit::Referrer.create!(campaign: DueCredit::Campaign.first, model: 'User', model_id: User.first.id)
@@ -34,19 +34,19 @@ Alternatively you can put in a Rails initializer something like this
34
34
 
35
35
  $due_credit_campaign = DueCredit::Campaign.where(name:'Product Announce', endpoint: '/').first_or_create
36
36
 
37
- # Routes added
37
+ Routes added
38
38
 
39
39
  get "due-credit/:token" => "due_credit/credit#click_through" , :as => :due_credit
40
40
 
41
- ## TODO
41
+ ##== TODO
42
42
 
43
43
  A shit ton. basic link through working.
44
44
 
45
- ## Reference
45
+ ##== Reference
46
46
 
47
47
  http://coding.smashingmagazine.com/2011/06/23/a-guide-to-starting-your-own-rails-engine-gem/
48
48
 
49
- ## Contributing
49
+ ##== Contributing
50
50
 
51
51
  1. Fork it
52
52
  2. Create your feature branch (`git checkout -b my-new-feature`)
@@ -5,7 +5,7 @@
5
5
 
6
6
  module DueCredit
7
7
  class Referrer < ActiveRecord::Base
8
- attr_accessible :token, :model, :model_id, :campaign
8
+ attr_accessible :token, :model, :model_id, :campaign, :campaign_id
9
9
  belongs_to :campaign
10
10
  has_many :referrals
11
11
  validates_presence_of :token, :model, :model_id, :campaign_id
@@ -1,3 +1,3 @@
1
1
  module DueCredit
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: due_credit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -127,5 +127,5 @@ rubyforge_project:
127
127
  rubygems_version: 1.8.23
128
128
  signing_key:
129
129
  specification_version: 3
130
- summary: due_credit-0.1.0
130
+ summary: due_credit-0.1.1
131
131
  test_files: []