Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Commit

Permalink
[FIX] Fixed incorrect filename to class inflection in Rake import task
Browse files Browse the repository at this point in the history
`bundle exec rake environment tire:import:all` now succeeds for a `Address` model.

Fix provided by @congshuanglong.

Closes #733, closes #744
  • Loading branch information
karmi committed Jun 3, 2013
1 parent ff36252 commit 495a6c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tire/tasks.rb
Expand Up @@ -134,7 +134,7 @@ def import_model(index, klass, params)
require path

model_filename = path[/#{Regexp.escape(dir.to_s)}\/([^\.]+).rb/, 1]
klass = model_filename.classify.constantize
klass = model_filename.camelize.constantize

# Skip if the class doesn't have Tire integration
next unless klass.respond_to?(:tire)
Expand Down

0 comments on commit 495a6c0

Please sign in to comment.