Module: PaperclipDatabase
- Defined in:
- lib/paperclip_database/version.rb,
lib/paperclip_database/deconstantize.rb,
lib/generators/paperclip_database/migration/migration_generator.rb
Defined Under Namespace
Modules: Generators
Constant Summary collapse
- VERSION =
"2.2.2"
Class Method Summary collapse
-
.deconstantize(path) ⇒ Object
This function only appears in Rails >= 3.2.1, so define our own copy here.
Class Method Details
.deconstantize(path) ⇒ Object
This function only appears in Rails >= 3.2.1, so define our own copy here
4 5 6 7 8 9 10 |
# File 'lib/paperclip_database/deconstantize.rb', line 4 def self.deconstantize(path) if Gem::Version.new(::Rails::VERSION::STRING) >= Gem::Version.new('3.2.1') path.deconstantize else path.to_s[0...(path.rindex('::') || 0)] end end |