defself.find(*args)
permalink = args.first if argument_is_permalink?(args.first)if permalink
show = find_by_permalink(args)if show thenreturn show
elseraiseActiveRecord::RecordNotFound,"Your first argument to Show.find was a permalink, but no Show could be found with a permalink of '#{permalink}'"endendsuperendprivatedefself.argument_is_permalink?(argument)
argument.is_a?(String)&& argument.to_i.to_s != argument.to_s
end