app/controllers/your_data_controller.rb
#
# Shows form for new activity.
#

Shows form for new activity.
Shows form for new activity .
def new_activity
    @activity = Activity.new
    @activity.date = params[:date].nil? ? Date.today : Date.parse(params[:date])
    @projects = Project.find_active
    @activity.project_id = @current_user.activities.find_recent.project_id unless @current_user.activities.empty?
  end
def new_activity @activity = Activity . new @activity . date = params [ :date ] . nil? ? Date . today : Date . parse ( params [ :date ] ) @projects = Project . find_active @activity . project_id = @current_user . activities . find_recent . project_id unless @current_user . activities . empty? end
Shows form for new activity.
Shows form for new activity .
# use date from params[:date] if the action is called from the calendar
