Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorLuka
     
    I've tryed Ajax on rails tutorial from http://www-128.ibm.com/developerworks/java/library/j-cb12056/?ca=dgr-lnxw02aAjaxOnRails

    so, first I've copied :
    <%= link_to_remote "time",
    :update => 'time_div',
    :url => {:action => "time"} %>

    literally, hoping that it would be picked up bu sintag, but i got "Click this link to show the current" without link "time" on the end.

    then I've chandged it into
    <?= $prototype_helper->link_to_remote('time',
    array('update' => 'time_div',
    'url' => array('action' => 'time'))) ?>

    with same result.

    the line <%= javascript_include_tag :defaults %> caused no code on output, so i've removed it.
    •  
      CommentAuthorbermi
     

    Hi Luka,

    Welcome to the Akelos forums,

    Seems like you have some configuration problem with your rewrite rules and Akelos

    For Ajax to work you certainly need the line

    <%= javascript_include_tag :defaults %>
    

    Which produces something like

    <script type="text/javascript" src="/javascripts/prototype.js">
    </script>                           
    <script type="text/javascript" src="/javascripts/event_selectors.js">
    </script>                           
    <script type="text/javascript" src="/javascripts/scriptaculous.js">
    </script>
    <script src="/javascripts/builder.js" type="text/javascript">
    </script>    
    <script src="/javascripts/effects.js" type="text/javascript">
    </script>    
    <script src="/javascripts/dragdrop.js" type="text/javascript">
    </script>    
    <script src="/javascripts/controls.js" type="text/javascript">
    </script>    
    <script src="/javascripts/slider.js" type="text/javascript">
    

    and I tried the code snippet

    <a onclick="new Ajax.Updater('time_div', '/blog/time/', {}); return false;" href="#">time</a>
    

    and worked as expected.

    Could you tell me which revision where you using?

    • CommentAuthorLuka
     
    Hi!

    I've downloaded dev_preview week or so ago. version.txt says 0.7.1. I'm running it on Linux/apache2/php4.4.7. I've also tried

    <?= $asset_tag_helper->javascript_include_tag ('defaults') ?>

    with the same results. Most anoying thing is that there is no error, so i don't know where to start looking.


    If you are talking about rewrite as in mod_rewrite, 'public' is linked to ~/public_html/ajax and I've added

    RewriteBase /~uname/ajax

    into .htaccess

    P.S. I've forgot to mention, that non ajax version works fine. that is <%= link_to "time", :action => "time" %> works as expected
    • CommentAuthorLuka
     
    Ive made same example in /var/www dir, and now it works ok. so it is something obaut rewriting I guess.