Forum: Ruby on Rails Controller handling of Non-model fields

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Chris H. (Guest)
on 2006-03-13 08:59
I'm a bit confused about how the Controller works for calls that aren't
intended to be remote (non-Ajax).
Specifically, if I don't want to interact with a Model.

Does ":action => whatever" always result in a call to the server? Or is
it handled like a javascript function (locally, on the client) in the
cases where no Model interaction is needed?

For example, what if I want to perform a simple operation on
user-inputted fields:

For example (from an example I have in a book):

<%= form_tag(:action => :calculate) %>
     <%= text_field_tag(:arg1, @params[:arg1], :size => 3) %>
     <%= select_tag(:operator,
     options_for_select(%w{ + - * / }, @params[:operator])) %>
     <%= text_field_tag(:arg2, @params[:arg2], :size => 3) %>
<%= end_form_tag %>

Is the "calculate" method handled on the client side or is this sent to
the server?
If the latter, how would I change it to be handled locally? (Say, by

Thank you in advance!
This topic is locked and can not be replied to.