Guest User

Untitled

a guest
Jul 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. # in /app/controllers/foo_controller.rb
  2. class FooController < ApplicationController
  3. active_scaffold :data
  4. end
  5.  
  6.  
  7. # in /vendor/plugins/active_scaffold/lib/actions/list.rb
  8. module ActiveScaffold::Actions
  9. module LiveSearch
  10.  
  11. def do_search
  12. self.active_scaffold_conditions = blah blah...
  13.  
  14. puts self # returns instance of FooController
  15. end
  16.  
  17. end
  18. end
  19.  
  20.  
  21. # in /vendor/plugins/active_scaffold/frontends/default/views/_export_csv.rhtml
  22.  
  23. # I want to access that same instance of FooController, but:
  24.  
  25. puts self # returns instance of ActionView::Base
Add Comment
Please, Sign In to add comment