Skip to content

Commit

Permalink
Fixed undefined method 'module_namespacing' for rails 3.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bearded committed Jul 6, 2012
1 parent 3ad238e commit 9a06cfd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/rails/generators/mongo_mapper/model/model_generator.rb
Expand Up @@ -18,6 +18,13 @@ def create_model_file
end

hook_for :test_framework

# Rails 3.0.X compatibility
unless methods.include?(:module_namespacing)
def module_namespacing(&block)
yield if block
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/rails/generators/mongo_mapper/model/templates/model.rb
Expand Up @@ -10,4 +10,4 @@ class <%= class_name %>
<% end -%>
end
<% end -%>
<% end -%>

0 comments on commit 9a06cfd

Please sign in to comment.