Created
September 1, 2011 19:24
-
-
Save KellyMahan/1187027 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 create | |
@timesheet = Timesheet.new(params[:timesheet]) | |
@date = @timesheet.start_date | |
if @timesheet.update_attributes(params[:timesheet]) | |
flash[:notice] = 'Timesheet was successfully saved.' | |
redirect_to timesheets_path | |
else | |
redirect_to timesheets_path | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
def create
@timesheet = Timesheet.new(params[:timesheet])
@Date = @timesheet.start_date
@timesheet.save
if @timesheet.update_attributes(params[:timesheet])
flash[:notice] = 'Timesheet was successfully saved.'
redirect_to timesheets_path
else
redirect_to timesheets_path
end
end