> Sorry, I usually use before_filter with a symbol and defining a method instead > of a proc, and then you don't get protected method errors: > > before_filter :check_nested > [...] > protected > def check_nested > redirect_to devices_path unless params[:parent_controller] > end
i just made it works that way using "parent_model" :) > I have been checking my code and I check params[:parent_controller] sometimes, > and other times I check params[:parent_column]. The best way would be "unless > params[:parent_controller] || params[:parent_column]" > In nested scaffolds you get parent_column and parent_model > In nested create forms you get parent_controller, parent_column and > parent_model > In nested update forms you get only parent_controller, other params are not > needed. thanks thats really usefull. Maybe will be a good idea a new option to block direct access to selected nested scaffolds. PD: great work --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
