rails_sql_views 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/core_ext/module.rb +11 -0
- data/lib/rails_sql_views/version.rb +1 -1
- data/lib/rails_sql_views.rb +2 -0
- metadata +4 -2
@@ -0,0 +1,11 @@
|
|
1
|
+
# This is required for 1.1.6 support
|
2
|
+
class Module
|
3
|
+
def alias_method_chain(target, feature)
|
4
|
+
# Strip out punctuation on predicates or bang methods since
|
5
|
+
# e.g. target?_without_feature is not a valid method name.
|
6
|
+
aliased_target, punctuation = target.to_s.sub(/([?!=])$/, ''), $1
|
7
|
+
yield(aliased_target, punctuation) if block_given?
|
8
|
+
alias_method "#{aliased_target}_without_#{feature}#{punctuation}", target
|
9
|
+
alias_method target, "#{aliased_target}_with_#{feature}#{punctuation}"
|
10
|
+
end
|
11
|
+
end
|
data/lib/rails_sql_views.rb
CHANGED
@@ -34,6 +34,8 @@ unless defined?(ActiveRecord)
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
require 'core_ext/module'
|
38
|
+
|
37
39
|
require 'rails_sql_views/connection_adapters/abstract/schema_definitions'
|
38
40
|
require 'rails_sql_views/connection_adapters/abstract/schema_statements'
|
39
41
|
require 'rails_sql_views/connection_adapters/mysql_adapter'
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rails_sql_views
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2006-12-
|
6
|
+
version: 0.2.0
|
7
|
+
date: 2006-12-28 00:00:00 -05:00
|
8
8
|
summary: Adds SQL Views to Rails.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -32,8 +32,10 @@ files:
|
|
32
32
|
- CHANGELOG
|
33
33
|
- README
|
34
34
|
- Rakefile
|
35
|
+
- lib/core_ext
|
35
36
|
- lib/rails_sql_views
|
36
37
|
- lib/rails_sql_views.rb
|
38
|
+
- lib/core_ext/module.rb
|
37
39
|
- lib/rails_sql_views/connection_adapters
|
38
40
|
- lib/rails_sql_views/schema_dumper.rb
|
39
41
|
- lib/rails_sql_views/version.rb
|