listings 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/listings/listings_controller.rb +8 -6
- data/config/routes.rb +1 -0
- data/lib/listings/base.rb +3 -2
- data/lib/listings/version.rb +1 -1
- metadata +1 -1
@@ -1,9 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
module Listings
|
2
|
+
class ListingsController < ActionController::Base
|
3
|
+
include ActionViewExtensions
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
def index
|
6
|
+
listing = prepare_listing params, view_context
|
7
|
+
render :partial => 'listings/index', :locals => { :listing => listing }
|
8
|
+
end
|
8
9
|
|
10
|
+
end
|
9
11
|
end
|
data/config/routes.rb
CHANGED
data/lib/listings/base.rb
CHANGED
@@ -99,8 +99,9 @@ module Listings
|
|
99
99
|
column.value_for(self, item)
|
100
100
|
end
|
101
101
|
|
102
|
-
def method_missing(m, *args, &block)
|
103
|
-
view_context.
|
102
|
+
def method_missing(m, *args, &block)
|
103
|
+
delegated_to = view_context.respond_to?(m) ? view_context : view_context.main_app
|
104
|
+
delegated_to.send(m, *args, block)
|
104
105
|
end
|
105
106
|
end
|
106
107
|
|
data/lib/listings/version.rb
CHANGED