Skip to content

Commit

Permalink
Merge branch 'master' of github.com:activescaffold/active_scaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
scambra committed Mar 30, 2012
2 parents f9523bd + 4aa4f21 commit dfdc933
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/active_scaffold/actions/core.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ def response_object
@response_object = successful? ? (@record || @records) : @record.errors @response_object = successful? ? (@record || @records) : @record.errors
end end


# Success is the existence of certain variables and the absence of errors (when applicable). # Success is the existence of one or more model objects. Most actions
# Success can also be defined. # circumvent this method by setting @success directly.
def successful? def successful?
if @successful.nil? if @successful.nil?
@records or (@record and @record.errors.count == 0 and @record.no_errors_in_associated?) @record || @records
else else
@successful @successful
end end
end end

def successful=(val) def successful=(val)
@successful = (val) ? true : false @successful = (val) ? true : false
end end
Expand Down

0 comments on commit dfdc933

Please sign in to comment.