Permalink
Browse files

Adds missing Railtie

  • Loading branch information...
Pascal Ehlert
Pascal Ehlert committed Dec 28, 2013
1 parent a903f68 commit 54fe902a14a990d997f8b2d7365b18d5e6895fb3
Showing with 11 additions and 1 deletion.
  1. +1 −0 lib/promocode_generator.rb
  2. +9 −0 lib/promocode_generator/railtie.rb
  3. +1 −1 lib/promocode_generator/version.rb
@@ -1,5 +1,6 @@
require "promocode_generator/version"
require "promocode_generator/model_additions"
+require "promocode_generator/railtie" if defined? Rails
module PromocodeGenerator
# Generates an 8 character random code of uppercase letters and numbers
@@ -0,0 +1,9 @@
+module PromocodeGenerator
+ class Railtie < Rails::Railtie
+ initializer 'promocode_generator.model_additions' do
+ ActiveSupport.on_load :active_record do
+ extend ModelAdditions
+ end
+ end
+ end
+end
@@ -1,3 +1,3 @@
module PromocodeGenerator
- VERSION = "0.0.2"
+ VERSION = "0.0.3"
end

0 comments on commit 54fe902

Please sign in to comment.