duffy 0.1.8 → 0.1.9

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: 4e08825eab80f162c76e7815a7be79bfc481a81f
4
- data.tar.gz: e7ca62ca598dfa32a4ba3d4dbda468bdbe54e54d
3
+ metadata.gz: 88204ca9277cf3c8d3c16fe73de7988edf525d2a
4
+ data.tar.gz: 4a98cb3182984b7e24203a4a062935ed15845ce4
5
5
  SHA512:
6
- metadata.gz: 47b1d4e7cdee31059a26845436300537a9227b380d91776eda64ca28457b240980990d588a1179c1af1952c746facc9cbb8ded54c3e202e4a2b4b0b7fef8d95e
7
- data.tar.gz: ed3c3003ba38f10fb3ffd8b4baee7b35ee55d44fac0ed4708a4e2351d58785b3d791a602b900ca3b9118dfd7aa8df18fe1b802719d82b69565379e0745445aa0
6
+ metadata.gz: ab145aa231671488f79a0263873b14a0a1a7fa43f5e499000db8aae8b414549f659215ffea4a5361f45fea3b9185c44365f9aa4808e7e219bac3f2c467be2c37
7
+ data.tar.gz: 778dd3860788bb46f48db10eda511e1271f09d59a80b4cb87e07930d1bed2c41f3c31bc4a6a3accc2b4f2f5083a40a0e7602bb03124449dab5a9e80e4ea39e52
data/README.md CHANGED
@@ -36,6 +36,13 @@ Date Patches:
36
36
  fiscal_year # Returns fiscal_year for a date. See config to set your organization's fiscal year start.
37
37
  ```
38
38
 
39
+ Active Record Aliases:
40
+ ```ruby
41
+ accepts => accepts_nested_attributes_for
42
+ habtm => has_and_belongs_to_many
43
+ ```
44
+
45
+
39
46
  Git Access:
40
47
  This one is namespaced in case you use the 'git' gem. I found it to be overkill for what I wanted.
41
48
  ```ruby
@@ -0,0 +1,13 @@
1
+ module ActiveRecord
2
+ module NestedAttributes
3
+ module ClassMethods
4
+ alias_method :accepts, :accepts_nested_attributes_for
5
+ end
6
+ end
7
+
8
+ module Associations
9
+ module ClassMethods
10
+ alias_method :habtm, :has_and_belongs_to_many
11
+ end
12
+ end
13
+ end
data/lib/duffy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Duffy
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
data/lib/duffy.rb CHANGED
@@ -4,8 +4,11 @@ require 'active_support/core_ext/object/blank'
4
4
  require 'date'
5
5
 
6
6
  # Rails Only Requirements
7
- require File.dirname(__FILE__) + "/duffy/engine" if defined?(Rails)
8
- require File.dirname(__FILE__) + "/duffy/railtie" if defined?(Rails)
7
+ if defined?(Rails)
8
+ require File.dirname(__FILE__) + "/duffy/engine"
9
+ require File.dirname(__FILE__) + "/duffy/railtie"
10
+ require File.dirname(__FILE__) + "/duffy/active_record"
11
+ end
9
12
 
10
13
  # Normal Requirements
11
14
  require File.dirname(__FILE__) + "/duffy/date"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Duffy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-01 00:00:00.000000000 Z
11
+ date: 2015-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -95,6 +95,7 @@ files:
95
95
  - Rakefile
96
96
  - duffy.gemspec
97
97
  - lib/duffy.rb
98
+ - lib/duffy/active_record.rb
98
99
  - lib/duffy/date.rb
99
100
  - lib/duffy/duffy_helper.rb
100
101
  - lib/duffy/engine.rb
@@ -130,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
131
  version: '0'
131
132
  requirements: []
132
133
  rubyforge_project:
133
- rubygems_version: 2.4.6
134
+ rubygems_version: 2.4.3
134
135
  signing_key:
135
136
  specification_version: 4
136
137
  summary: Library of things