Greg Donald wrote:
> On Thu, Feb 11, 2010 at 1:33 PM, Marnen Laibow-Koser
> <li...@ruby-forum.com> wrote:
>>> get_user.rjs:
>>>
>>> if @user
>>> � page.replace_html 'user_tab', :partial => 'user/user_form'
>>> � page << "$j( '#user_tab' ).fadeIn('slow');"
>>> end
>>
>> Hmm. �Why the visual effect here, rather than in the completion handler
>> for the Ajax call?
> 
> Because I build more than just toy apps.  

So do I.

> Sometimes I have complex
> logic for what effect to show, or what to do when an exception is
> raised.  Sometimes the JS is generated, like:
> 
> page << "$j(function(){ $j.notifyBar({ html: '#{ "Enrollment goals
> updated" }', delay: #{ FLASH_EXPIRE_DELAY }, animationSpeed: 'normal'
> }); });"

I'd consider that problematic application design, but again, I'll think 
about it further.  I'd rather let the client-side JS make this decision.

> 
>> I guess I don't see the point of Rails writing JS,
> 
> I agree, you do not.
> 
> 
> --
> Greg Donald
> destiney.com | gregdonald.com

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to