app/controllers/your_data_controller.rb
#
# Loads project if params[:id] is given. This method should be called in before_filter.
#

Loads project if params[:id] is given. This method should be called in before_filter.
Loads project if params [ : id ] is given . This method should be called in before_filter .
def load_activity
    @activity = Activity.find(params[:id]) if params[:id]
  rescue ActiveRecord::RecordNotFound
    flash[:notice] = "No such activity"
    redirect_to :action => :index
  end
def load_activity @activity = Activity . find ( params [ :id ] ) if params [ :id ] rescue ActiveRecord :: RecordNotFound flash [ :notice ] = "No such activity" redirect_to :action => :index end
Loads project if params[:id] is given.
Loads project if params [ : id ] is given .