Certainly.

the :accessible goes in the model.

class Claim < ActiveRecord::Base
  hobo_model
  fields do
    patient_id    :integer
  end

  belongs_to :patient, :accessible => true

 ...
end


And then I redefine the form which gets displayed on the edit page &
the new page

<def tag="form" for="Claim">
  <form param="default" merge>
    <error-messages/>
    <select-one:patient/>
  </form>
</def>

or if you wanted the fields instead:

<def tag="form" for="Claim">
  <form param="default" merge>
    <error-messages/>
    <% this.patient = Patient.new if this.patient.nil? %>
    <field-list:patient/>
  </form>
</def>

Bryan

On Mar 2, 9:52 pm, Steve Shephed <[email protected]> wrote:
> Can you explain the code and where you put the accessible setting.
> Then give an example. thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to