look i discover one way to know if the controller is called for nested
i do that
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
helper_method :is_nested?
protect_from_forgery # :secret =>
'd570c9985b1e275e2e3305abf8a572c1'
def is_nested?
if params[:nested]==true
active_scaffold_config.actions.exclude("delete")
active_scaffold_config.actions.freeze
end
end
end
but the way i used to delete the action dont works
maybe someone knows how to do that
and we need a before_filter :is_nested on ModelController to call that
method,
I just could a method call with before_filter, i have used the freeze
method, cause in the active_scaffold maybe the action could be
included again...
On 7 jan, 14:40, "Vinicius Gati" <[email protected]> wrote:
> maybe there is a way to recover the params on controller and modify the config
> for active scaffold
>
> 2009/1/7 Vinicius Gati <[email protected]>:
>
> > yes we can override _nested but i see some code in there like :
>
> > concat render(:active_scaffold => controller.controller_path,
> > :constraints => @constraints,
> > :conditions => association.options[:conditions],
> > :label => h(@label),
> > :params => {:nested => true, :parent_column => column_name,
> > :parent_model => association.active_record}
> > ), binding
>
> > i dont understand that but this {:nested => true} really
> > annoying me :D
>
> > 2009/1/7 mr.gaffo <[email protected]>:
>
> >> look for form overrides in the documentation, or you may have to
> >> override _form if you're doing even more specific stuff.
>
> >> On Jan 6, 10:59 pm, chouti <[email protected]> wrote:
> >>> Thanks vinicius,
> >>> yes, I want to customize the view of nested subform.
> >>> That's a good news to know you are working on it.
> >>> Thanks again. :-)
>
> >>> On Jan 7, 12:04 pm, Vinicius <[email protected]> wrote:
>
> >>> > u means u need a custom display settings to nested for example?
> >>> > if that's is te question i'm working on it and i will post son as i
> >>> > has discovered
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---