Created
October 5, 2012 13:44
-
-
Save creich/3839873 to your computer and use it in GitHub Desktop.
This file contains 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
def show_booking | |
@time_logs = TimeLog.where(:id => params[:time_log_ids]).all | |
respond_to do |format| | |
format.js | |
end | |
end |
This file contains 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
def show_booking | |
@time_logs = TimeLog.where(:id => params[:time_log_ids]).all | |
render :update do |page| | |
time_logs.each do |item| | |
@time_log = item | |
page.replace_html 'entry-'+item.id.to_s, :partial => 'time_logs/booking_form' | |
end | |
end | |
end |
This file contains 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
<% @time_logs.each do |item| %> | |
$('#<%= "entry-" + item.id.to_s %> ').html(' <%= escape_javascript(render(:partial => 'time_logs/booking_form', :locals => {:time_log => item})) %> '); | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment