Hi kenny,

Thanks for suggestion...

I searched few other blogs also...and put my code like this...because
at this point i don't which is the project_id for which this product
is going to render. So throught active scaffold constraint i am able
to get my project id...

BUT When you press "Create Another" this active_scaffold_constraints)
[:project_id] is getting "nil" value so my product dropdown becomes
empty.

module ShippingDetailHelper
  def product_form_column(record, input)
    select record, input, Product.find(:all, :conditions =>
{:project_id =>
      controller.send(:active_scaffold_constraints)
[:project_id]}).collect{|p| [p.to_label, p.id]}
  end
end

##### OUTPUT
This is working fine when you press "create new"
BUt once you press "Create Another" the drop down becomes empty as
(:active_scaffold_constraints)[:project_id] becomes nil.



Any other variable i can use here so that i can get project_id
continuously.

you used current_project.id...but how to set this current_project ???
where to set ??? kindly expain...


Thanks


--~--~---------~--~----~------------~-------~--~----~
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