Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adds missing Railtie

  • Loading branch information...
commit 54fe902a14a990d997f8b2d7365b18d5e6895fb3 1 parent a903f68
Pascal Ehlert authored
View
1  lib/promocode_generator.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
View
9 lib/promocode_generator/railtie.rb
@@ -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
View
2  lib/promocode_generator/version.rb
@@ -1,3 +1,3 @@
module PromocodeGenerator
- VERSION = "0.0.2"
+ VERSION = "0.0.3"
end
Please sign in to comment.
Something went wrong with that request. Please try again.