sur says ajax :on => rails

Friday, June 23, 2006

A GOOD SEARCH TECHNIQUE

A fine way to search from more than one column from the DB.
Even, all the join conditions can easily be provided...
Check this out ...

TextSearch

Friday, June 02, 2006

DO NOT GO FOR RJS TEMPLATES


RJS is undoubtly a good method of ajaxification of your web application.
But why to have another myaction.rjs file if its functionality could be merged
within the action itself.
Is it possible ?

Oh !!! its like applying butter on bread.......... check this out




class MyController < ApplicationController
def myaction
render :update do ¦ page ¦
page.replace_html 'update_this_element_id', :partial=>update_from_controller/update_partial_file'
# and all your effects of scrip.aculo.us as we do put in your myaction.rjs
end
end
end


Well, atleast you can avoid myaction.rjs files for just some render partials or a few special effects or when you can afford to not to separate your rjs code.


Well, RJS beautifully continues the MVC behaviour but,
in some cases it might be better to to go for the above one.


So dont feel hazi, you can try it for a while.