app/controllers/your_data_controller.rb
def search
    if params[:commit] == "Generate graph"
      graph
      render :action => 'graph'
    else
      activities_list
      render :action => 'activities_list'
    end
  end
#
# Redirects to list of activitities or graph depending on submit button
# with data specified by search conditions
#

Redirects to list of activitities or graph depending on submit button
with data specified by search conditions
Redirects to list of activitities or graph depending on submit button with data specified by search conditions
def search
    if params[:commit] == "Generate graph"
      graph
      render :action => 'graph'
    else
      activities_list
      render :action => 'activities_list'
    end
  end
def search if params [ :commit ] == "Generate graph" graph render :action => 'graph' else activities_list render :action => 'activities_list' end end
Redirects to list of activitities or graph depending on submit button
with data specified by search conditions
Redirects to list of activitities or graph depending on submit button with data specified by search conditions