Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update
- #render :text => params[:news_story].inspect
- @news_story = NewsStory.find(params[:id])
- for picture in @news_story.pictures
- picture.cropped = 0
- end
- if @news_story.update_attributes(params[:news_story])
- flash[:notice] = 'NewsStory was successfully updated.'
- if @news_story.all_cropped?
- redirect_to @news_story
- else
- redirect_to :controller => 'croppers', :action => 'new', :picture => @news_story.next_picture_to_crop
- end
- else
- render :action => "edit"
- end
- end
Add Comment
Please, Sign In to add comment