chanko 2.3.0 → 3.0.0

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.
@@ -1,57 +0,0 @@
1
- module Chanko
2
- module Unit
3
- class Extender
4
- module ActiveRecordClassMethods
5
- delegate(
6
- :apply_modules,
7
- :arel,
8
- :array_of_strings?,
9
- :build_arel,
10
- :build_joins,
11
- :build_select,
12
- :build_where,
13
- :create_with,
14
- :custom_join_sql,
15
- :eager_load,
16
- :extending,
17
- :from,
18
- :group,
19
- :having,
20
- :includes,
21
- :joins,
22
- :limit,
23
- :lock,
24
- :offset,
25
- :order,
26
- :preload,
27
- :readonly,
28
- :reorder,
29
- :reverse_order,
30
- :reverse_sql_order,
31
- :scope,
32
- :select,
33
- :where,
34
- :to => :@mod
35
- )
36
-
37
- %w[belongs_to has_many has_one].each do |method_name|
38
- class_eval <<-EOS
39
- def #{method_name}(*args, &block)
40
- label = args.shift.to_s
41
- name = @prefix + label
42
- options = args.extract_options!
43
- options = options.reverse_merge(:class_name => label.singularize.camelize)
44
- args << options
45
- @mod.#{method_name}(name.to_sym, *args, &block)
46
- end
47
- EOS
48
- end
49
-
50
- def scope(*args, &block)
51
- name = @prefix + args.shift.to_s
52
- @mod.scope(name, *args)
53
- end
54
- end
55
- end
56
- end
57
- end