Skip to content

Commit

Permalink
Adds missing Railtie
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Ehlert committed Dec 28, 2013
1 parent a903f68 commit 54fe902
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/promocode_generator.rb
@@ -1,5 +1,6 @@
require "promocode_generator/version" require "promocode_generator/version"
require "promocode_generator/model_additions" require "promocode_generator/model_additions"
require "promocode_generator/railtie" if defined? Rails


module PromocodeGenerator module PromocodeGenerator
# Generates an 8 character random code of uppercase letters and numbers # Generates an 8 character random code of uppercase letters and numbers
Expand Down
9 changes: 9 additions & 0 deletions 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
2 changes: 1 addition & 1 deletion lib/promocode_generator/version.rb
@@ -1,3 +1,3 @@
module PromocodeGenerator module PromocodeGenerator
VERSION = "0.0.2" VERSION = "0.0.3"
end end

0 comments on commit 54fe902

Please sign in to comment.