I also had the issues with classify not recognizing singular names like "business", so I went with
ruby
private
deffind_commentable
commentable = nil
params.each do |name, value|
if name =~ /(.+)_id$/
commentable = name.humanize.constantize.find(value)
endend
commentable
end
Aha. I had the same problem but I realized that the ASCIIcast doesn't have it while the main code does!
If you use
<%= best_in_class_if (logged_in? && post_owner?), @post, :title %>
Then it will render uneditable text if you don't satisfy the if statement.
Do you mind telling us how?
I also had the issues with
classify
not recognizing singular names like "business", so I went withI read that this is a valid REST response. It's saying that "test" doesn't exist (the username is unique).