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
# Install logrotate on OS X: | |
# sudo port clean --all logrotate && sudo port install logrotate | |
# Add e.g. this to your crontab: | |
# /opt/local/sbin/logrotate -s /Users/deploy/.logrotate/sites.status /Users/deploy/.logrotate/sites.conf | |
# This file would be sites.conf. | |
# See http://overstimulate.com/articles/logrotate-rails-passenger for more info. | |
daily | |
missingok | |
rotate 30 |
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
# SUPER DARING APP TEMPLATE 1.0 | |
# By Peter Cooper | |
# Link to local copy of edge rails | |
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' } | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" |
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 update | |
@instructor = Instructor.find(params[:id]) | |
respond_to do |format| | |
if @instructor.update_attributes(params[:instructor][course]) | |
flash[:notice] = 'Instructor was successfully updated.' | |
format.html { redirect_to(@instructor) } | |
format.xml { head :ok } | |
else | |
format.html { render :action => "edit" } |
NewerOlder