Hi,

I understand that I can use record_select_conditions_from_controller
in order to filter the records that will be shown on record_select. My
question is: is there any way of filtering this information depending
on the controller that is invoking record_select

Let's say, for example, that I have three models:
Book
Author
Publisher

And
Class Author
has_many :books

Class Publisher
has_many :books

Class Book
belongs_to :Author
belongs_to :Publisher

In this case, I would configure record_select in the
books_controller.rb
record_select :per_page => 5, :search_on => 'title'

And I would configure activescaffold in the authors_controller.rb and
publisher_controllers.rb by introducing the following line in the
config block

config.columns[:book].form_ui = :record_select

Imagine that I want to filter books differently depending on whether
I'm invoking record_select from the authors controller or the
publishers controllers. (very much like
options_for_association_conditions, where I can establish the
conditions for a given association)

Is there any way to do this with
record_select_conditions_from_controller, by passing the invoking
controller as a parameter or any other means?

Thanks in advance
Pedro

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to