search for: add_album

Displaying 1 result from an estimated 1 matches for "add_album".

2006 May 31
7
Rails, Transactions, and statements
...ement that has yet to be committed. The operation that uses the id may fail, and if so, I need to rollback the database. I can''t figure out how to send only the statement to the database without the commit without sending over hard coded SQL. This is what I started out with: 1 def add_album 2 Album.transaction do 3 @page = Page.find(params[:id]) 4 @album = Album.new(params[:album]) #creates a new Album in the database 5 6 linking = Linking.new(:page_id => params[:id]) 7 linking.linkable = @album 8 9 create_path(@album.id) #makes a directory using...