Ruby on Rails Thursday, February 28, 2013

A1. If you have a mockup already you replicate most of the look and feel by pasting that in your erb file and replacing forms etc with their form helper counterparts.  The only issue to keep in mind, most of those produce less than optimal code, which means you may want to clean that up a bit.  

A2. Rails comes with jQuery included by default (in later versions anyways). You can simply bind events to the DOM with jQuery.  Something along the lines of:
$('#someId).on('click',function(){
     yourfunction();
});
It's really quite easy once you learn how.  http://api.jquery.com/category/events/

On Thursday, February 28, 2013 5:32:04 PM UTC-7, Ruby-Forum.com User wrote:
Q1. It looks that most convenient way of developing Rails Views is using
form helpers when developing forms and partials.

On the other hand one can develop much richer HTML5 pages/mockups using
WYSIWYG tools like CKEditor, Dojo/IBM Maqetta, etc.

How one can continue with Rails having already developed Web site
mockups?

Q2. Up to my findings, Ajax can be automatically fired using
:remote=>true but just in link_to and form_for helpers.

There are many other JavaScript client events when one needs Ajax to be
called. How to proceed with Ajax in that case, for example onClick
mouse/keyboard event?

--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Evjj4-Brd88J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment