lib/og/store.rb in og-0.26.0 vs lib/og/store.rb in og-0.27.0
- old
+ new
@@ -16,16 +16,13 @@
# Return the store for the given name.
def self.for_name(name)
Logger.info "Og uses the #{name.to_s.capitalize} store."
-
# gmosx: to keep RDoc happy.
- eval %{
- require 'og/store/#{name}'
- return #{name.to_s.capitalize}Store
- }
+ require('og/store/' + name.to_s)
+ return Og.const_get("#{name.to_s.capitalize}Store")
end
# Creates a store.
def self.create(options)
@@ -190,14 +187,12 @@
begin
start
yield(self)
commit
rescue => ex
- Logger.error 'Error in transaction'
- Logger.error ex
- Logger.error ex.backtrace
rollback
+ raise ex
end
end
private
@@ -216,5 +211,7 @@
def eval_og_create_schema(klass)
end
end
end
+
+# * George Moschovitis <gm@navel.gr>