Created
December 4, 2011 03:18
-
-
Save MichaelDrogalis/1429024 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Controller: | |
def show_week_ajax | |
@period = TrainingPeriod.new current_user.id, TrainingPeriod.parse_date(params[:startdate]) | |
@writable = true | |
respond_to do |format| | |
format.js { render :action => "workout-slider", :layout => false } | |
end | |
end | |
workout-slider.js.erb: | |
$("#workout-week").append("<%= render 'show_workouts', :locals => { :period => @period, :writable => @writable } %>"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment