Hi All,

Anybody has any solution for above problem ?????
Now explaining again in brief......


SCENARIO :::::::

IN project model :-      "has_many: shipping"

IN shipping model :-   "has_many: sample"
                                "belongs_to: project"

IN sample model :-      "belongs_to: product"

IN product model :-       "belongs_to: project"



<%= render :active_scaffold => 'shipping', :constraints =>
{:project_id => @record.id } %>

In shipping helper i am trying to override product drop down of sample
controller...
(shipping has many sample.)

module ShippingDetailHelper

  #### HOW TO GET project_id here ????
  ##### currently through active_scaffold_constraints i am getting the
project_id
  ##### BUT WHEN YOU PRESS "Create Another" this value is getting
loss.

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

end



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