added railtie and connect class method