Displaying 1 result from an estimated 1 matches for "ydinn".
Did you mean:
dinn
2012 May 15
1
How to handle ActiveRecord::RecordInvalid
...s/domain,
app/services/application and app/services/infrastructure. I''m using
services in active admin controller section. When validation fail it can''t
redirect correctly, it keeps throwing me ActiveRecord::RecordInvalid. Here
is the error page:
<http://i.stack.imgur.com/YDiNN.png>
And here is the category service:
def self.create(params)
ActiveRecord::Base.transaction do
begin
category = Category.new(params)
decrease_counters(category.id)
increase_counters(category.id)
category.save!
end
en...