Hi all,
I am teaching myself rails and I can’t figure out why the following
code does not work: ‘say’ part works, but nothing shows up for
‘get_new’ part.
Here is my chat_controller.rb file:
class ChatController < ApplicationController
def index
end
def say
@line = params[:say_so]
end
def get_new
end
end
Here is my index.rhtml file:
<%= form_remote_tag :update => “put_here”, :url => {:action => ‘say’}
%>
<%= text_field_tag ‘say_so’ %>
<%= submit_tag 'Say' %> <%= end_form_tag %>
<%= periodically_call_remote :url => {:action => ‘get_new’ }, :update
=> ‘put_there’, :frequency => 2.0 %>
say.rhtml and get_new.rhtml files are simply:
<%= @line %>