jordi-find_by_sql_file 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +17 -4
- data/find_by_sql_file.gemspec +1 -1
- data/init.rb +1 -1
- metadata +1 -1
data/README.markdown
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
This plugin extends the API of `ActiveRecord::Base.find_by_sql`.
|
4
4
|
|
5
|
+
## A Warning
|
6
|
+
|
7
|
+
Besides the warnings on the `ERB` section below (don't ignore those), this
|
8
|
+
code is not tested at all, and has no track record whatsoever. So there,
|
9
|
+
beware.
|
10
|
+
|
5
11
|
## Usage
|
6
12
|
|
7
13
|
Instead of passing the SQL statement as a string...
|
@@ -13,11 +19,18 @@ You can pass a symbol that refers to a query file stored in
|
|
13
19
|
|
14
20
|
Elephant.find_by_sql :massive_weight
|
15
21
|
|
16
|
-
##
|
22
|
+
## Installation instructions
|
17
23
|
|
18
|
-
|
19
|
-
|
20
|
-
|
24
|
+
Via rubygems:
|
25
|
+
|
26
|
+
sudo gem install jordi-find_by_sql_file --source http://gems.github.com
|
27
|
+
|
28
|
+
# Add the following to config/environment.rb:
|
29
|
+
config.gem 'jordi-find_by_sql_file', :source => 'http://gems.github.com'
|
30
|
+
|
31
|
+
As a Rails plugin:
|
32
|
+
|
33
|
+
./script/install plugin git://github.com/jordi/find_by_sql_file.git
|
21
34
|
|
22
35
|
## Motivation
|
23
36
|
|
data/find_by_sql_file.gemspec
CHANGED
data/init.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require 'lib
|
1
|
+
require File.join(File.dirname(__FILE__), 'lib', 'find_by_sql_file')
|