Hi... I'm upgrading from Rails1.3.6 to 2.3.2 and from AjaxScaffold to
ActiveScaffold code as well. Mostly working, but for some reason my
screen is not refreshing properly.

I have a series of 'letter shortcuts' (A..Z) to select only a portion
of my list plus two added options "All" and "None". These are
implemented like so:

<!-- ***Start*** of modifications for letter codes -->
        <div id="ltr-locate">
        <% (('A'..'Z').to_a + ['{All}', '{None}']).each do |ltr| %>
                <%= link_to_remote "#{ltr}",
                {       :url => { :controller => 'asset', :action => 
"get_assets", :ltr =>
ltr }  ,
                        :type => :asynchronous,
                        :update => 'asset-content' },
                {       :href => url_for(:action => 'get_assets'),
                        :align => 'right',
                        :class => "ltr-locate"  } %>
                &nbsp;
        <% end %>
        </div>
<!-- ***End*** of modifications for letter codes -->

  def conditions_for_collection
    @ltr = (session[:ltr] ||= '')
    @ltr = '' if @ltr == '{All}'
    @ltr = "\x00" if @ltr == '{None}'
    upper = @ltr.upcase() + '%'
    lower = @ltr.downcase() + '%'
    [ 'user_id = ? and ( entry like ? or entry like ? )', session
['user']['id'], upper, lower ]
  end

  def get_assets
    session[:ltr] = params[:ltr]
    render_component :controller => 'asset', :action =>
'update_table', :params => params, :page => 1, :scaffold_id => 'asset'
  end

When I click on one of the shortcuts, the display doesn't change, but
if I hit the browser refresh button, then the display is properly
updated.

I'm guessing this has something to do with the order in which things
happen(?)... I've had this running in the past, so I'm guessing it has
to do with the latest versions of Rails or AS...

Thanks...jon
--~--~---------~--~----~------------~-------~--~----~
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