Vishwanath Nayak wrote:
> Hi,
> 
> First of all, if you want to use puts in your views, use <% %> tags 
> rather
> than <%= %> tags.
> Secondly, if you load your partials once you have your data 
> object(@project)
> with appropriate value your page should display the same.
> But if you change the value of @project.version after the partial is 
> loaded,
> it would not be reflected on the page until you reload the particular 
> div
> which has the text field tag with the partial.
> 
> -NAYAK
> 
> On Tue, Dec 30, 2008 at 6:42 PM, Zhao Yi

Hi,

This is my controller code:

def update_project_selection

   @project = Project.find(:all,:conditions=>"name='#{selected_project}' 
")
   render :partial => "project_version", :layout=>false
end

I update the @project object before load the partial. Why does the page 
display the same value?

Below is the view page:

<%=
        select_tag:project_selection,options_for_select(@project_names)
%>

<%=
  observe_field :project_selection,
    :frequency => 0.5,
    :update => 'ajaxWrapper',
    :url => {:action => 'update_project_selection'},
    :with => "'project_selection='+encodeURIComponent(value)"
%>
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to