Hello,

I'd like to make a wizard (separate controller) with a div with the
list of photos (model Photo).
Each photo on the list has a link_to_remote which hide the list and
loads photo's thumbinals (model Thumb).

I made it but I wonder if there's a better way to do that. Especially
without creating additional partial files.

My test solution (only one link_to_remote action) below.
I also found that I can't pass any variables/attributes into partial.

class WizardController < ApplicationController
  hobo_controller
  def load_versions
    hobo_ajax_response if request.xhr?
  end
end

[load_versions.rjs]
page[:photos].fade
page[:thumbs].appear
page.replace_html :thumbs, render(:partial => 'thumbs')

[views/wizard/index.dryml]
<page title="Wizard">
  <content-body:>

      <div id="c1">
        <div id="photos">
          <h3>Select photo/thumb</h3>
          <partial name="photos"/>
        </div>
        <div id="versions">
          <partial name="thumbs"/>
        </div>
      </div>

      <div id="c2">
        <h3>Selected thumbs</h3>
        <div>
          <%= link_to_remote "TEST load thumbs", :url => { :action =>
"load_thumbs", :id => 3 } %>
        </div>
      </div>

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